The Aura Subgraph indexes data on the Aura smart contracts with a GraphQL interface. It updates data in response to function calls and contract events to maintain data on the Booster, Pools, AuraLocker etc, to power front-end apps and integrations.
Current Versions
Network
Subgraph URL
Playground
Examples
Get. the balance of an account at a given block
Note: account address is case sensitve, search with lowercase
queryaccountData($accountAddress: String!, $blockNumber: Int!) { accounts(where: { id: $accountAddress }, block: { number: $blockNumber }) { id auraLockerAccount { balanceLocked balanceNextUnlockIndex delegateUpdatedAt id userLocksLength account { id poolAccounts(where: {}) { id pool { id totalStaked totalSupply } } } } }}
GraphQL Schema
The data included in this subgraph data layer is the data that is most applicable to the front-end. It aims at the very least to keep track of all the resources Account and keep track of basic pool data and AuraLocker
The schema of GraphQL elements is the same on every Network, it's available in the docs section of the playground. Alternatively you can extract the whole schema with packages such as get-graphql-schema or by seding the following query:
queryIntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types {...FullType } directives { name description locations args {...InputValue } } }}fragment FullType on__Type { kind name description fields(includeDeprecated: true) { name description args {...InputValue } type {...TypeRef } isDeprecated deprecationReason } inputFields {...InputValue } interfaces {...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes {...TypeRef }}fragment InputValue on__InputValue { name description type {...TypeRef } defaultValue}fragment TypeRef on__Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } }}