The Graph
Important Note
The Graph nodes provided by EXPchain is only a sandbox. The Graph admin endpoint is made public to allow anyone to be able to use it for testing. Projects should run their own Graph instances in production and avoid exposing the admin endpoint.
EXPchain Testnet Sandbox
- JSON-RPC Admin (Deploy subgraphs): https://thegraph-jsonrpc-testnet.expchain.ai
- GraphQL HTTP Server (Query subgraphs): https://thegraph-subgraphs-testnet.expchain.ai
- Query Status(Subgraph indexing status): https://thegraph-index-testnet.expchain.ai
- IPFS: https://thegraph-ipfs-testnet.expchain.ai
An example deployed subgraph is available for block on EXPchain Testnet.
Deploying Subgraphs
Install graph-cli
GitHub - graphprotocol/graph-tooling: Monorepo for various tools used by subgraph developers.
Write your subgraph
See Creating a Subgraph . You can also use an example project like v2-uniswap.
Upgrade the manifest
Update the network
properties in the subgraph.yaml
manifest file. The network name for EXPchain is expchain-testnet
.
Create your subgraph
graph create <subgraph-name> --node https://thegraph-jsonrpc-testnet.expchain.ai
Deploy your subgraph
graph deploy <subgraph-name> --debug --ipfs https://thegraph-ipfs-testnet.expchain.ai --node https://thegraph-jsonrpc-testnet.expchain.ai
Once deployed, your graph should now be deployed and accessible via the GraphQL Server. It can be access at:
https://thegraph-subgraphs-testnet.expchain.ai/subgraphs/name/YOUR_SUBGRAPH_NAME/graphql