What and why subgraphs are most important for Web3 ?

Alex Klos
2 min readDec 21, 2020

The Graph hosting platform transmits over 10 billion requests per month through subgraphs, open APIs that anyone can request using GraphQL. Once the Graph Network is launched, it will be available to application developers and managed by indexers and curators.

Indexers work with Graph Nodes and tie GRT to the data being indexed, providing uptime, reducing the security risk of centralized databases, and allowing applications to be completely serverless. Indexers are paid for queries and rewarded for their indexing services. Curators signal subgraphs and tell GRT indexers which subgraphs are of good quality and should be indexed. Curators also receive a portion of the payment for requests for subgraphs they signal to, prompting them to curate high-quality sources of information. One subgraph can index data from multiple contracts. Triggers for a data source in a block are ordered using the following process: event and call triggers are first ordered by the transaction index in the block. Triggers with the same transaction are ordered by condition: first events, then calls, each type of which corresponds to the order defined in the manifest. Block triggers fire after events and call triggers, in manifest order.

Subgraphs serve one end purpose: to provide reliable data to the end user (for example, a consumer or another application). These end users will pay to use. Only useful subgraphs will be polled and generate income. On the proposal side, data is provided through graph nodes that are managed by indexers. Computing power is a resource and therefore limited.

Subgraphs can provide ultra-fast response times as computations on the raw blockchain data are done retroactively; allowing indexed data to be served on demand. With retroactive computing and a robust infrastructure, subgraphs can handle complex queries. It is important to note that subgraphs provide a high level of granularity, allowing you to index specific contracts, methods, and events if desired. They also provide the freedom to start indexing at any given block height, which can help reduce the time it takes to synchronize and index subgraphs. In addition, public subgraphs allow any application or user to query the indexed data it contains. As a result, multiple applications can use the same set of subgraphs, reducing replication time and redundant development. Developers can rest assured that the subgraphs they access will remain online through a redundant, decentralized Graph network that does not rely on any indexer.

--

--