Overview of The Graph subgraphs
A subgraph is a decentralized indexing layer that extracts data from a blockchain, processes it, and stores it for efficient retrieval via GraphQL. This prevents DApps from having to query the chain directly, which is often slow and expensive. A subgraph consists of three key components:
subgraph.yaml: The manifest file containing the subgraph configuration.schema.graphql: The GraphQL schema defining the data entities and how they are queried.- AssemblyScript Mappings: Code that translates raw blockchain event data into the entities defined in the schema.