Deploying
Deploy a Subgraph to Biibot network
Deploying your subgraph will upload the subgraph files that you've built with yarn build
to IPFS and tell the Graph Explorer to start indexing your subgraph using these files.
{
"name": "wmeer",
"license": "UNLICENSED",
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"create-graph": "graph create --node https://deploy.api.biibot.com/meer/ biibot/wmeer",
"remove-graph": "graph remove --node https://deploy.api.biibot.com/meer/ biibot/wmeer",
"deploy-graph": "graph deploy --node https://deploy.api.biibot.com/meer/ --ipfs https://ipfs.api.biibot.com biibot/wmeer"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.37.1",
"@graphprotocol/graph-ts": "0.28.1"
}
}
You deploy the subgraph by running yarn deploy-graph
After deploying the subgraph, the Graph Explorer will switch to showing the synchronization status of your subgraph. Depending on the amount of data and the number of events that need to be extracted from historical Ethereum blocks, starting with the genesis block, syncing can take from a few minutes to several hours. The subgraph status switches to Synced
once the Graph Node has extracted all data from historical blocks. The Graph Node will continue inspecting Ethereum blocks for your subgraph as these blocks are mined.
Redeploying a Subgraph
When making changes to your subgraph definition, for example, to fix a problem in the entity mappings, run the yarn deploy-graph
command above again to deploy the updated version of your subgraph. Any update of a subgraph requires that Graph Node reindexes your entire subgraph, again starting with the genesis block.
If your previously deployed subgraph is still in status Syncing
, it will be immediately replaced with the newly deployed version. If the previously deployed subgraph is already fully synced, Graph Node will mark the newly deployed version as the Pending Version
, sync it in the background, and only replace the currently deployed version with the new one once syncing the new version has finished. This ensures that you have a subgraph to work with while the new version is syncing.