StellarUAE Hi! Here's how you would do it in Astrograph:
{
asset(id: "USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN") {
balances(first:10) {
nodes {
account { id }
spendableBalance
authorized
}
}
}
}
Astrograph was built from the ground up to be a fully-featured GraphQL server for Stellar network, rather than a thin wrapper around existing storages. A large part of the value of GraphQL lies in providing an abstraction between services and consumers, so the schema should not be tightly coupled either to particular service implementations or to particular consumers as they exist today. So in general don't expect Astrograph to directly expose Core/Horizon DB relational data.
You will notice here and there that we didn't limit ourselves by existing table structures or Horizon-defined representations of certain entities. Instead, we tried to follow schema-first approach and tried to map Stellar network on a graph in the most sensible way. For example, unlike stellar-core, in Astrograph asset is a proper top-level entity, and you can start with the asset and then follow the asset <1--*> balance
connection to get all the balances, and each balance belongs to an account, so you can follow that connection, and so on until you get all the necessary data. Also, in certain cases we took the liberty to use different terminology (i.e. trustline
vs balance
).
There's some basic schema documentation, but I would recommend to use interactive documentation and playground with autocomplete, which also has schema embedded docs.
One final note is that we don't provide any SLA for our pubnet and testnet Astrograph instances, so they should be considered development playgrounds and not used in anything close to live systems. In particular, pubnet instance does not have the full historical data ingested.
If you'll have further questions, feel free to start a discussion on Github or jump in to our public Keybase group