Run the following command to generate the generated
folder:
yarn codegen
Create a .env
file with the following variables:
MATIC_RPC_URL=
docker compose up
docker compose down
sudo docker rm resolution-subgraph-graph-node-1 && sudo docker rm resolution-subgraph-ipfs-1 && sudo docker rm resolution-subgraph-postgres-1 && sudo docker rm resolution-subgraph-ganache-1
While local subgraph node is running run:
yarn create-local
yarn deploy-local
Access the GraphQL editor at:
http://localhost:8000/subgraphs/name/resolutions-subgraph/graphql
Example query:
query marketResolutions {
marketResolutions {
id
author
ancillaryData
lastUpdateTimestamp
status
wasDisputed
proposedPrice
reproposedPrice
price
updates
}
}
Build the subgraph with yarn build
and then run the following to deploy:
goldsky subgraph deploy resolutions-subgraph/<version> --path .