GlossaryAdvanced
Subgraph
An open API that indexes and organizes blockchain data for a specific application.
A subgraph is an open, queryable API that indexes and organizes blockchain data relevant to a specific application, letting that application efficiently query complex data instead of directly scanning raw blockchain data on every request.
This is a common pattern behind The Graph and similar decentralized indexing infrastructure, letting many different applications share efficiently-indexed access to the same underlying chain data.
Examples
- A DeFi application might use a subgraph to efficiently query its own protocol's historical activity.
- Subgraphs let applications avoid directly scanning raw blockchain data for every query.