Developing a Subgraph

Learn how to create a subgraph and write your GraphQL Schema, handlers, and subgraph manifest.

Every subgraph is a collection of GraphQL, AssemblyScript / Typescript, and YAML code that follows the same structure. Go through the following guides to learn how to create your subgraph and iterate on the code:

PageDescription
Graph CLILearn how to work with the open-source graph-cli package.
Creating a SubgraphCreate your subgraph from scratch or an existing contract.
Project StructureUnderstand the project structure of a subgraph and important files (schema.graphql, subgraph.yaml).
Data SourcesDefine your input data sources from on-chain smart contracts.
Writing MappingsWrite AssemblyScript mappings for transforming input data into your GraphQL API.
ReadMe