Skill based on The Graph docs (graphprotocol/docs), generated 2026-02-09. Official docs: https://thegraph.com/docs
The Graph indexes blockchain data into queryable subgraphs. Subgraphs are defined by a manifest (subgraph.yaml), a GraphQL schema, and AssemblyScript mappings; they are queried via GraphQL. Substreams provide parallel, multi-chain indexing with multiple sinks.
Core References
| Topic |
Description |
Reference |
| Subgraph Manifest |
Data sources, event/call/block handlers, indexer hints |
core-subgraph-manifest |
| Schema |
Entities, scalars, relationships, @derivedFrom, fulltext |
core-schema |
| Mappings |
AssemblyScript handlers, graph-ts, codegen, store API |
core-mappings |
| GraphQL API |
Queries, filtering, pagination, sorting, time-travel |
core-graphql-api |
| Subgraph ID vs Deployment ID |
When to use which for querying; version pinning |
core-deployment-id-vs-subgraph-id |
Best Practices
| Topic |
Description |
Reference |
| Performance |
Avoid eth_calls, immutable entities, Bytes ids, @derivedFrom, pruning |
best-practices-performance |
| Grafting & Hotfix |
Reuse indexed data for hotfix deployment; when to use and avoid |
best-practices-grafting-hotfix |
| Timeseries & Aggregations |
@entity(timeseries), @aggregation, intervals, dimensions |
best-practices-timeseries |
| Querying |
Static queries, variables, @include/@skip, batching, fragments |
best-practices-querying |
Features
Subgraph Features
| Topic |
Description |
Reference |
| Data Source Templates |
Dynamic contracts, factory pattern, create/createWithContext |
features-data-source-templates |
| Deployment & Publishing |
Deploy to Studio, publish to network, CLI, GRT signal |
features-deployment-publishing |
| Querying from Application |
Endpoints, graph-client, Apollo, URQL, API keys |
features-querying-from-application |
| Unit Testing (Matchstick) |
graph test, describe/test, assertions, mocking, coverage |
features-unit-testing |
| Subgraph Composition |
Combine up to 5 source subgraphs; immutable entities, same chain |
features-subgraph-composition |
| Subgraph Linter |
Static analysis: entity overwrite, null safety, undeclared eth_calls |
features-subgraph-linter |
| Debug Forking |
Fork remote store at block X for fast local debugging |
features-debug-forking |
| Graph Node Dev (gnd) |
Local node with optional IPFS, auto Postgres, --watch |
features-graph-node-dev |
Indexing
External Links