Like all GraphQL APIs, you can use introspection to explore the schema, types, and queries available in the subgraph. Below are a few possible ways of using the subgraph:
List all realms
{ realms(orderBy: createdAtTimestamp, orderDirection: desc) { id name description token { address symbol name decimals } createdAtTimestamp }}
Get infusion info for an NFT across all realms
{ nfts(where: { collection: "0xc0877d217b1b83a3347c1703032ae1e013a8fd9f"tokenId: "11" }) { tokenId collection { address } owner { address } # there will be 1 Infusion entity for-each Realm this NFT is infused in infusions { realm { id name token { symbol } } balance lastClaimAtTimestamp # all discrete infusion and claim events will be here events { eventType amount msgSender { address } target { address } createdAtTimestamp } } }}
Get details about a specific account (wallet / agent)
{ account(id:"0xa34c3476ae0c4863fc39e32c0e666219503bed9f") { address # realms this account is admin for realmAdmins { realm { id name } } # realms this account is an infuser for realmInfusers { realm { id name } } # realms this account is a claimer for realmClaimers { realm { id name } } # realms this account has created createdRealms {id name} # any accounts this account can infuse/claim on behalf of proxiesAsProxy { realm { id name } delegator { address } } # any accounts that can infuse/claim on behalf of this account proxiesAsDelegator { realm { id name } proxy { address } } # all nfts owned by this account that have been infused across all realms ownedNFTs { tokenId collection { address } infusions { realm { id name } balance } } # find all discrete infusions this account has executed infusionEventsAsTarget(where:{ eventType: INFUSE }) { amount infusion { realm { id name } nft { tokenId collection {address} owner { address } } } } }}