BuyCoins API Guide
Search…
Global Object Identification
Get any object (or array of objects) with just their IDs
The BuyCoins API GraphQL Schema 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 pull data on a Transaction:
1
node(id: "VHlwZXM6OlB1YmxpY0FwaTo6QWRkcmVzcy1mOGRmNGZlYy1iZTJmLTQ1YjktOWJjMy04YjMwMGNhZTg5Y2I") {
2
... on Transaction {
3
txhash
4
address
5
confirmed
6
}
7
}
Copied!
Alternatively, if you had a list/an array of ids:
1
nodes(ids: ["id1", "id2"]){
2
...on Transaction {
3
txhash
4
address
5
}
6
...on Address {
7
cryptocurrency
8
}
9
}
Copied!
As can be seen from the example above, you can handle for multiple types.
Last modified 1yr ago
Copy link