The Graph — subgraph manifest, schema, mappings, GraphQL API, templates, Substreams, and performance practices for agent-driven indexing.
Resources
2Install
npx skillscat add hairyf/blockchain-skills/thegraph Install via the SkillsCat registry.
SKILL.md
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 |
Best Practices
| Topic | Description | Reference |
|---|---|---|
| Performance | Avoid eth_calls, immutable entities, Bytes ids, @derivedFrom, pruning | best-practices-performance |
Features
Subgraph Features
| Topic | Description | Reference |
|---|---|---|
| Data Source Templates | Dynamic contracts, factory pattern, create/createWithContext | features-data-source-templates |
Indexing
| Topic | Description | Reference |
|---|---|---|
| Substreams | Parallel indexing, Rust/WASM, multi-chain, multi-sink | features-substreams |