Skip to content

Commit

Permalink
Adding a subgraph-starter-example with deployed example
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed May 14, 2024
1 parent 43cc083 commit 3917f21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
17 changes: 8 additions & 9 deletions subgraphs/starter-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,23 @@ You can check the indexing status of the subgraph using the provided GraphQL end
curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ indexingStatusForCurrentVersion(subgraphName: \"your-subgraph-name\") { synced } }" }' https://testnet-thegraph.swirldslabs.com/graphql
```

### 6. Real world examples.
We have already used this template to deploy Saucer Token subgraph on both testnet and mainnet. You can check the subgraph here:
### 6. Already deployed world example
We have already used this template to deploy `Sauce` Token subgraph on both `testnet` and `mainnet`. You can check the subgraph here:

**Subgraph name:** `saucerswap/token-transfers`
**Subgraph name:** `saucerswap/token-sauce-transfers`

**Queries:**
- Testnet: https://testnet-thegraph.swirldslabs.com/subgraphs/name/hashgraph/saucerswap/token-transfers
- Mainnet: https://mainnet-thegraph.swirldslabs.com/subgraphs/name/hashgraph/saucerswap/token-transfers
- Testnet: https://testnet-thegraph.swirldslabs.com/subgraphs/name/saucerswap/token-sauce-transfers/graphql

- Mainnet: https://mainnet-thegraph.swirldslabs.com/subgraphs/name/hashgraph/saucerswap/token-sauce-transfers
**Indexing Status:**
- Testnet:
```bash
# Check the indexing status for saucerswap/token-transfers on testnet
curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ indexingStatusForCurrentVersion(subgraphName: \"saucerswap/token-transfers\") { synced } }" }' https://testnet-thegraph.swirldslabs.com/graphql
# Check the indexing status for saucerswap/token-sauce-transfers on testnet
curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ indexingStatusForCurrentVersion(subgraphName: \"saucerswap/token-sauce-transfers\") { health synced chains { chainHeadBlock { number } latestBlock { number } } } }" }' https://testnet-thegraph.swirldslabs.com/graphql | jq
```

- Mainnet:
```bash
# Check the indexing status for saucerswap/token-transfers on mainnet
curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ indexingStatusForCurrentVersion(subgraphName: \"saucerswap/token-transfers\") { synced } }" }' https://mainnet-thegraph.swirldslabs.com/graphql
curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ indexingStatusForCurrentVersion(subgraphName: \"saucerswap/token-sauce-transfers\") { health synced chains { chainHeadBlock { number } latestBlock { number } } } }" }' https://mainnet-thegraph.swirldslabs.com/graphql | jq
```
4 changes: 2 additions & 2 deletions subgraphs/starter-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"generate": "envsub --env-file .env subgraph.template.yaml subgraph.yaml",
"codegen": "graph codegen",
"build": "graph build",
"create": "source .env && graph create --node ${ARKHIA_SUBGRAPH_URL}/${ARKHIA_API_KEY} ${SUBGRAPH_NAME}",
"deploy": "source .env && graph deploy --node ${ARKHIA_SUBGRAPH_URL}/${ARKHIA_API_KEY} --ipfs ${ARKHIA_IPFS_URL}/${ARKHIA_API_KEY} ${SUBGRAPH_NAME}",
"create": "source .env && graph create --node ${HEDERA_THE_GRAPH_NODE} ${SUBGRAPH_NAME} --access-token ${ACCESS_TOKEN}",
"deploy": "source .env && graph deploy --node ${HEDERA_THE_GRAPH_NODE} --ipfs ${IPFS_URL} ${SUBGRAPH_NAME} --access-token ${ACCESS_TOKEN}",
"test": "graph test"
},
"author": "",
Expand Down

0 comments on commit 3917f21

Please sign in to comment.