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.Documentation Index
Fetch the complete documentation index at: https://berachain-422fce37-feat-nodes-section-reno.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Repository
- Code: github.com/berachain/guides/tree/main/apps/goldsky-subgraph
- README (raw): raw README
Official documentation
Requirements
- Node
v20.11.0or 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
- Clone and install
- Goldsky setup: Create account at app.goldsky.com, create API key, install CLI, run
goldsky login. - Build subgraph
- Deploy
- Query — After indexing, use the public GraphQL endpoint (see Goldsky dashboard). Example query for accounts and balances in README.
Key files
| Purpose | Path |
|---|---|
| Subgraph config / schema | Project root (see README) |
| Mappings | See README |