Skip to main content
Use this guide when you want to index Berachain blockchain data (e.g. ERC20 balances) and query it via GraphQL using the Goldsky subgraph SDK.

Repository

Official documentation

Requirements

  • Node v20.11.0 or greater, npm
  • Goldsky account and API key
  • Goldsky CLI (install: curl https://goldsky.com | sh)

Stack

Node.js, Goldsky CLI, GraphQL subgraph (schema + mappings).

Quick start

  1. Clone and install
  2. Goldsky setup: Create account at app.goldsky.com, create API key, install CLI, run goldsky login.
  3. Build subgraph
  4. Deploy
  5. Query — After indexing, use the public GraphQL endpoint (see Goldsky dashboard). Example query for accounts and balances in README.

Key files