thegraph

The Graph — subgraph manifest, schema, mappings, GraphQL API, templates, Substreams, and performance practices for agent-driven indexing.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "thegraph" with this command: npx skills add hairyf/blockchain-master/hairyf-blockchain-master-thegraph

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

TopicDescriptionReference
Subgraph ManifestData sources, event/call/block handlers, indexer hintscore-subgraph-manifest
SchemaEntities, scalars, relationships, @derivedFrom, fulltextcore-schema
MappingsAssemblyScript handlers, graph-ts, codegen, store APIcore-mappings
GraphQL APIQueries, filtering, pagination, sorting, time-travelcore-graphql-api
Subgraph ID vs Deployment IDWhen to use which for querying; version pinningcore-deployment-id-vs-subgraph-id

Best Practices

TopicDescriptionReference
PerformanceAvoid eth_calls, immutable entities, Bytes ids, @derivedFrom, pruningbest-practices-performance
Grafting & HotfixReuse indexed data for hotfix deployment; when to use and avoidbest-practices-grafting-hotfix
Timeseries & Aggregations@entity(timeseries), @aggregation, intervals, dimensionsbest-practices-timeseries
QueryingStatic queries, variables, @include/@skip, batching, fragmentsbest-practices-querying

Features

Subgraph Features

TopicDescriptionReference
Data Source TemplatesDynamic contracts, factory pattern, create/createWithContextfeatures-data-source-templates
Deployment & PublishingDeploy to Studio, publish to network, CLI, GRT signalfeatures-deployment-publishing
Querying from ApplicationEndpoints, graph-client, Apollo, URQL, API keysfeatures-querying-from-application
Unit Testing (Matchstick)graph test, describe/test, assertions, mocking, coveragefeatures-unit-testing
Subgraph CompositionCombine up to 5 source subgraphs; immutable entities, same chainfeatures-subgraph-composition
Subgraph LinterStatic analysis: entity overwrite, null safety, undeclared eth_callsfeatures-subgraph-linter
Debug ForkingFork remote store at block X for fast local debuggingfeatures-debug-forking
Graph Node Dev (gnd)Local node with optional IPFS, auto Postgres, --watchfeatures-graph-node-dev

Indexing

TopicDescriptionReference
SubstreamsParallel indexing, Rust/WASM, multi-chain, multi-sinkfeatures-substreams
Substreams SinksSQL, PubSub, stream, KV; official vs communityfeatures-substreams-sinks

External Links

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

openzeppelin-contracts

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

viem

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

envio

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

wagmi

No summary provided by upstream source.

Repository SourceNeeds Review