TheGraph exposes a GraphQL endpoint to query the events and entities within the Demask ecosystem.
Currently, there are multiple subgraphs about Mumbai and Chapel network.
-
Mumbai: Tracks all events and entities Demask on Mumbai network.
-
Chapel: Tracks all events and entities Demask on Chapel network.
- Graph CLI
- Required to generate and build local GraphQL dependencies.
Install with yarn:
yarn global add @graphprotocol/graph-cliInstall with npm:
npm install -g @graphprotocol/graph-cligraph init --product hosted-service <GITHUB_ACCOUNT>/<DIRECTORY>For hosted service of the subgraph:
-
Run the
cd <DIRECTORY>command to move to the subgraph directory. -
Run the
graph codegencommand to prepare the TypeScript sources for the GraphQL (generated/*). -
Run the
graph buildcommand to build the subgraph, and check compilation errors before deploying. -
Run
graph auth --product hosted-service '<ACCESS_TOKEN>'command to authenticate with your deploy key. -
Deploy via
graph deploy --product hosted-service <GITHUB_ACCOUNT_USER>/<DIRECTORY>.