Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use subgraph for queries #28

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat: use subgraph for queries #28

wants to merge 5 commits into from

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Aug 10, 2022

work in progress: figuring out how to build a properly paginated (read: using GraphQL Cursor Connections Specification [1]) subgraph

following along with https://thegraph.com/docs/en/developing/creating-a-subgraph/

ran `graph init`

options selected:

✔ Protocol · near
✔ Subgraph name · TENK-DAO/v2.tenk.testnet
✔ Directory to create the subgraph in · subgraph
✔ NEAR network · near-testnet
✔ Contract account · v2.tenk.testnet
✔ Contract Name · Contract
———
  Generate subgraph
  Write subgraph to directory
✔ Create subgraph scaffold
✔ Initialize networks config
✔ Initialize subgraph repository
✔ Install dependencies with yarn
✔ Generate ABI and schema types with yarn codegen
✔ Add another contract? (y/N) · false
Even though `v2.tenk.testnet` was deployed in block `86896681`, adding
this as a `startBlock` in `subgraph.yaml` causes this error when trying
to deploy:

    ✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/:
      subgraph validation error:
      [the specified block must exist on the Ethereum network]
    error Command failed with exit code 1.

This seems to be a bug with TheGraph; I've asked about it in their
Discord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant