Run the following command to generate the generated folder:
yarn codegenCreate a .env file with the following variables:
MATIC_RPC_URL=docker compose updocker compose downsudo 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-1While local subgraph node is running run:
yarn create-localyarn deploy-localAccess 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 .