Subgraph Manifest Definition
A Subgraph manifest is essentially a JSON file that defines how a subgraph maps data from a data source to a graph, as per TheGraph protocol. This is pivotal in defining how on-chain data gets processed and organized before getting saved as part of the graph.
Subgraph Manifest Key Points
- A Subgraph manifest is what TheGraph protocol uses to map on-chain data to a graph.
- It’s a JSON file serving as a fundamental part for creating Subgraphs.
- Specifies data sources and how the data from these sources will be processed and organized.
- It consists of several sections, which essentially relate to the data source itself, the entities involved, the mappings aspect, and the schema employed.
What is a Subgraph Manifest?
TheGraph protocol, which aids in the indexing and querying of blockchain data, employs what’s known as a Subgraph manifest. This is essentially a declarative, application-specific indexing specification for how on-chain data, upon being received, will be processed, organized, and eventually saved.
Why is a Subgraph Manifest important?
The Subgraph Manifest is integral to the functioning of TheGraph protocol. It is what enables the creation of decentralized and serverless applications by defining how blockchain data is processed, organized, and stored. By specifying each data source and how each individual’s piece of data is mapped and translated, it enables seamless interaction with the blockchain.
When is a Subgraph Manifest used?
A Subgraph Manifest is crucial during the creation of any Subgraph in accordance with TheGraph protocol. Whenever there’s a necessity to map events or data from a contract to be saved in the Graph’s persistent store, a Subgraph manifest is definitely required.
Where is a Subgraph Manifest used?
The Subgraph manifest primarily finds its application in TheGraph protocol. Specifically, it’s used within the realm of blockchain technology where there is a need for organising data from the blockchain to enable efficient querying.
How does a Subgraph Manifest work?
A Subgraph manifest typically consists of several sections related to the data sources (like Ethereum events or IPFS files), the entities set to be ingested, the mappings that govern how raw blockchain data is translated into meaningful entity data, and the schema which defines the structure of the data. The Subgraph manifest essentially bridges the incoming blockchain data and the graph’s persistent store by giving a clear-cut mapping instruction, which is subsequently followed in the data organisation process.