query Search($input: RefundSearchInput!, $after: String) {
    search {
        refunds(input: $input, after: $after) {
            pageInfo {
                hasNextPage
                startCursor
                endCursor
            }
            edges {
                node {
                    id
                    legacyId
                    createdAt
                    status
                    amount {
                        value
                        currencyCode
                    }
                    orderId
                    merchantAccountId

                    statusHistory {
                        __typename
                        status
                        source
                        timestamp
                        ... on AuthorizedEvent {
                            processorResponse {
                                legacyCode
                                cvvResponse
                                avsPostalCodeResponse
                                avsStreetAddressResponse
                            }
                        }
                        ... on SettledEvent {
                            settlementBatchId
                        }
                    }
                    customer {
                        id
                        legacyId
                        email
                        firstName
                        lastName
                    }
                    paymentMethod {
                        id
                        legacyId
                        details {
                            __typename
                            ... on CreditCardDetails {
                                brandCode
                                last4
                                expirationMonth
                                expirationYear
                                uniqueNumberIdentifier
                                origin {
                                    type
                                }
                            }
                            ... on PayPalAccountDetails {
                                email
                            }

                        }
                    }
                    refundedTransaction {
                        id
                        legacyId
                    }
                    paymentMethodSnapshot {
                        __typename
                        ... on PayPalTransactionDetails {
                            captureId
                        }
                    }
                    details {
                        __typename
                        ... on PayPalRefundDetails {
                            refundId
                        }
                    }
                }
            }
        }
    }
}
