SubQuery powers the next generation of Polkadot dApps by allowing developers to extract, transform and query blockchain data in real time using GraphQL. In addition to this, SubQuery provides production quality hosting infrastructure to run these projects in.
This subquery indexes balance transfers between accounts, it is designed to demonstrate the many-to-many relationship within these entities.
This subquery also indexes the utility batchAll calls which are formated in tree structure, and we established an one-to-many relationship within those entities, allow us to understand the actual actions of this extrinsic and know its position in the tree.
git clone https://github.com/subquery/subql-examples.git
cd entity-relation
# Yarn
yarn
#NPM
npm install
#Yarn
yarn codegen
#NPM
npm run-script codegen
#Yarn
yarn build
#NPM
npm run-script build
#Yarn
yarn start:docker
#NPM
npm run start:docker
{
query{
transfers{
nodes{
amount
}
}
}
}