Tutorials & Examples

SubQuery TeamLess than 1 minute

Tutorials & Examples

Here we will list our tutorials and explore various examples to help you get up and running in the easiest and fastest manner.

SubQuery Examples

SubQuery Example Projects

extrinsic-finalized-blockopen in new windowIndexes extrinsics so they can be queried by their hashThe simplest example with a block handler function
block-timestampopen in new windowIndexes timestamp of each finalized blockAnother simple call handler function
validator-thresholdopen in new windowIndexes the least staking amount required for a validator to be elected.More complicated block handler function that makes external calls to the @polkadot/api for additional on-chain data
sum-rewardopen in new windowIndexes staking bond, rewards, and slashes from the events of finalized blockMore complicated event handlers with a one-to-many relationship
entity-relationopen in new windowIndexes balance transfers between accounts, also indexes utility batchAll to find out the content of the extrinsic callsOne-to-many and many-to-many relationships and complicated extrinsic handling
kittyopen in new windowIndexes birth info of kitties.Complex call handlers and event handlers, with data indexed from a custom chain