Global Object Identification

Like the BuyCoins GraphQL Schema, Sendcash implements the GraphQL Global Object Identification Specification.

What this means is that you can use the node or nodes query to get ANY object(s) as long as you have the id(s).

For example, if you wanted to get a specific wire-out payout:

node(id: "VHlwZXM6OlB1YmxpY0FwaTo6QWRkcmVzcy1mOGRmNGZlYy1iZTJmLTQ1YjktOWJjMy04YjMwMGNhZTg5Y2I") {
    ... on Payout {
        amount
        createdAt
        id
        status
        trackingRef
        wireoutAccount
    }
}

Alternatively, if you had a list/an array of ids:

nodes(ids: ["id1", "id2"]){
    ...on Payout {
        amount
        createdAt
        id
        status
        trackingRef
        wireoutAccount
    }
    ...on WireOutAccount {
        accountName
        accountNumber
    }
}

As can be seen from the example above, you can handle for multiple types.

Last updated