1---2name: thegraph3description: The Graph — subgraph manifest, schema, mappings, GraphQL API, templates, Substreams, and performance practices for agent-driven indexing.4---56> Skill based on The Graph docs (graphprotocol/docs), generated 2026-02-09. Official docs: https://thegraph.com/docs78The 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.910## Core References1112| Topic | Description | Reference |13|-------|-------------|-----------|14| Subgraph Manifest | Data sources, event/call/block handlers, indexer hints | [core-subgraph-manifest](references/core-subgraph-manifest.md) |15| Schema | Entities, scalars, relationships, @derivedFrom, fulltext | [core-schema](references/core-schema.md) |16| Mappings | AssemblyScript handlers, graph-ts, codegen, store API | [core-mappings](references/core-mappings.md) |17| GraphQL API | Queries, filtering, pagination, sorting, time-travel | [core-graphql-api](references/core-graphql-api.md) |18| Subgraph ID vs Deployment ID | When to use which for querying; version pinning | [core-deployment-id-vs-subgraph-id](references/core-deployment-id-vs-subgraph-id.md) |1920## Best Practices2122| Topic | Description | Reference |23|-------|-------------|-----------|24| Performance | Avoid eth_calls, immutable entities, Bytes ids, @derivedFrom, pruning | [best-practices-performance](references/best-practices-performance.md) |25| Grafting & Hotfix | Reuse indexed data for hotfix deployment; when to use and avoid | [best-practices-grafting-hotfix](references/best-practices-grafting-hotfix.md) |26| Timeseries & Aggregations | @entity(timeseries), @aggregation, intervals, dimensions | [best-practices-timeseries](references/best-practices-timeseries.md) |27| Querying | Static queries, variables, @include/@skip, batching, fragments | [best-practices-querying](references/best-practices-querying.md) |2829## Features3031### Subgraph Features3233| Topic | Description | Reference |34|-------|-------------|-----------|35| Data Source Templates | Dynamic contracts, factory pattern, create/createWithContext | [features-data-source-templates](references/features-data-source-templates.md) |36| Deployment & Publishing | Deploy to Studio, publish to network, CLI, GRT signal | [features-deployment-publishing](references/features-deployment-publishing.md) |37| Querying from Application | Endpoints, graph-client, Apollo, URQL, API keys | [features-querying-from-application](references/features-querying-from-application.md) |38| Unit Testing (Matchstick) | graph test, describe/test, assertions, mocking, coverage | [features-unit-testing](references/features-unit-testing.md) |39| Subgraph Composition | Combine up to 5 source subgraphs; immutable entities, same chain | [features-subgraph-composition](references/features-subgraph-composition.md) |40| Subgraph Linter | Static analysis: entity overwrite, null safety, undeclared eth_calls | [features-subgraph-linter](references/features-subgraph-linter.md) |41| Debug Forking | Fork remote store at block X for fast local debugging | [features-debug-forking](references/features-debug-forking.md) |42| Graph Node Dev (gnd) | Local node with optional IPFS, auto Postgres, --watch | [features-graph-node-dev](references/features-graph-node-dev.md) |4344### Indexing4546| Topic | Description | Reference |47|-------|-------------|-----------|48| Substreams | Parallel indexing, Rust/WASM, multi-chain, multi-sink | [features-substreams](references/features-substreams.md) |49| Substreams Sinks | SQL, PubSub, stream, KV; official vs community | [features-substreams-sinks](references/features-substreams-sinks.md) |5051## External Links5253- [The Graph Docs](https://thegraph.com/docs)54- [graphprotocol/docs GitHub](https://github.com/graphprotocol/docs)55- [graph-tooling (graph-ts)](https://github.com/graphprotocol/graph-tooling)56- [Substreams docs](https://docs.substreams.dev)