query Search($input: TransactionSearchInput!, $after: String) {
    search {
        transactions(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
                    }
                    riskData {
                        decision
                    }
                    refunds {
                        id
                        legacyId
                    }
                    paymentMethodSnapshot {
                        __typename
                        ... on PayPalTransactionDetails {
                            authorizationId
                            paymentId
                            captureId
                            customField
                            refundId
                            sellerProtectionStatus
                            payer {
                                payerId
                                email
                                firstName
                                lastName
                            }
                            payee {
                                email
                            }
                        }
                        ... on CreditCardDetails {
                            bin
                            brandCode
                            last4
                            expirationMonth
                            expirationYear
                            uniqueNumberIdentifier
                            origin {
                                type
                            }
                        }
                    }
                    paymentMethod {
                        id
                        legacyId
                        details {
                            __typename
                            ... on CreditCardDetails {
                                brandCode
                                last4
                                expirationMonth
                                expirationYear
                                uniqueNumberIdentifier
                                origin {
                                    type
                                }
                            }
                            ... on PayPalAccountDetails {
                                email
                            }

                        }
                    }
                }
            }
        }
    }
}
