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 example adds a reverse lookup field on Account.myToAddress meaning that it is accessible from the Account entity but is just a reference or pointer back to Transfer.to.
git clone https://github.com/subquery/tutorials-account-transfer-reverse-lookups.git
cd <folder>
yarnyarn codegenyarn builddocker-compose pull & docker-compose upOpen http://localhost:3000/ on your browser
query{
accounts(first:5){
nodes{
id
myToAddress{
nodes{
id
amount
}
}
}
}
}