What Is The Graph (GRT): Complete Decentralized Indexing Guide (2026)

— By Tony Rabbit in Tutorials

What Is The Graph (GRT): Complete Decentralized Indexing Guide (2026)

What is The Graph (GRT)? Complete 2026 guide: subgraphs, 4-role economy (indexer/curator/delegator/consumer), GraphQL queries, Geo AI pivot and top consumer dApps.

Every time you open a Web3 application and see a balance, a token price, a transaction history or a portfolio dashboard render in under a second, something invisible is doing the heavy lifting behind the scenes. Blockchains are excellent at writing data but terrible at reading it efficiently. Without an indexing layer, every dApp would need to scan every block of a chain to answer the simplest question. The Graph is the protocol that fixed that problem and quietly became one of the most important pieces of infrastructure in the entire industry.

The Graph (GRT) is a decentralized indexing and querying protocol for blockchains. It takes the raw, unstructured data that lives on networks like Ethereum, Polygon, Arbitrum, Optimism, Avalanche and dozens of others, organizes it into open APIs called subgraphs, and makes that data queryable through GraphQL. Major applications including Uniswap, Aave, Lido, Decentraland and ENS rely on The Graph to serve hundreds of millions of queries per day. By 2026, it has become as essential to Web3 as DNS is to the traditional internet.

This guide is built to go deeper than the surface explainers that dominate the search results. You will learn the four-role economic system that powers the network, how a subgraph is built and queried, what GraphQL is and how it differs from REST APIs, the tokenomics behind GRT including inflation and fee burn, the protocol's pivot toward AI through Geo Genesis, the sunset of the hosted service, the high-performance Substreams technology, and how to integrate The Graph into your own dApp. By the end you will understand not only what The Graph is, but why investors, developers and infrastructure operators treat it as a long-term bet on the readability of blockchain data.

The Graph protocol homepage showing decentralized indexing infrastructure for Web3 dApps in 2026
The Graph - the decentralized indexing layer powering thousands of dApps.

What Is The Graph?

The Graph is an open-source protocol that organizes blockchain data into structured, queryable APIs. It was created in 2017 by Yaniv Tal, Jannis Pohlmann and Brandon Ramirez, and the team behind it, Edge & Node, released the hosted service in 2018 and launched the decentralized network on Ethereum mainnet in December 2020. The native token, GRT, is the work and payment token that ties the entire system together.

At its core, The Graph performs the same function that Google performs for the web. Google crawls billions of pages, builds an index, and lets you query that index with simple search terms. The Graph crawls every block of every supported blockchain, extracts the events and state changes that matter, organizes them by application, and lets developers query that organized data with a powerful query language called GraphQL. The crucial difference is that, unlike Google, no single company owns or operates The Graph. The indexing is performed by hundreds of independent indexer nodes operated by anyone willing to stake GRT and run the software.

The output of this indexing work is a subgraph. A subgraph is a small open API that defines what data should be extracted from a smart contract or set of contracts and how that data should be organized. Once a subgraph is deployed, anyone in the world can query it. Front-end developers stop worrying about RPC calls, log parsing, event filters and database schemas. They write a single GraphQL query and receive structured JSON back in milliseconds.

The Problem It Solves

To understand why The Graph exists, you need to understand how painful it is to read blockchain data without an indexing layer. A blockchain is, fundamentally, a linked list of blocks. Each block contains transactions, each transaction can emit events, and each event records a tiny piece of state change. There is no built-in way to ask a chain a question like "give me the last 100 swaps on the USDC/ETH pool sorted by volume". The chain has no concept of pools, swaps or sorting. It only knows about blocks, transactions and raw bytes.

If you wanted to answer that question without The Graph, you would have two options, both bad. The first option is to use an RPC provider and scan every block since the contract was deployed, parse the logs, filter the events you care about, decode their parameters, store them in your own database, keep that database in sync with the chain forever, handle reorgs when blocks get reverted, and finally build an API on top of it. The second option is to pay a centralized indexing service that does all of that for you, accepting that your dApp now depends on a single company that can rate-limit you, raise prices or simply go offline.

The Graph eliminates both problems. The indexing work is done once, by professional indexer nodes, and the result is published as a public good that anyone can query for a small fee paid in GRT. The economics make it cheap because indexers compete for query fees. The architecture makes it reliable because there are always multiple indexers serving the same subgraph. And because the entire system is governed by smart contracts and an open protocol, no single party can censor or shut down access. You can read more about the underlying infrastructure layers in our guide on block explorers, which serve a related but more limited function.

The 4 Roles That Power The Network

The Graph runs on a coordinated system of four economic roles, each with its own incentives and responsibilities. Together they create a self-sustaining marketplace for indexed blockchain data. Understanding these roles is the single most important concept in the entire protocol.

ROLE 1
💻
Subgraph Developer
Defines schema, mappings and manifest. Deploys the subgraph to the network.
ROLE 2
Indexer
Stakes GRT, runs a Graph Node, indexes subgraphs and serves queries for fees.
ROLE 3
📊
Curator
Signals GRT on quality subgraphs via bonding curve, earns share of query fees.
ROLE 4
🤝
Delegator
Stakes GRT to trusted indexers without running hardware. Shares rewards.
CONSUMER (dApp)
Pays query fees in GRT to read indexed data. This payment flows back to indexers, curators and delegators as rewards.

The subgraph developer is the entry point of the entire flow. They write the code that tells the network what data to extract from a contract and how to organize it. A subgraph developer might be the team behind a DeFi protocol publishing the official subgraph for their own product, or an independent builder creating a third-party subgraph that aggregates data from multiple sources. Once they deploy the subgraph, their job is technically done, although most maintain and update their subgraphs over time as their contracts evolve.

The indexer is the heavy infrastructure role. Indexers run physical or cloud servers that host a piece of software called Graph Node. Graph Node reads the underlying blockchain via an archive RPC, processes events according to the subgraph's manifest, and stores the resulting data in a PostgreSQL database. Indexers must stake a minimum of 100,000 GRT to participate, and they earn revenue from two sources: query fees paid by consumers and indexing rewards minted by the protocol. They can also be slashed if they serve incorrect data, which is verified through a dispute resolution process.

The curator is the quality signal of the network. With thousands of subgraphs deployed, indexers need a way to know which ones are worth allocating their stake and resources to. Curators solve this by signaling GRT on subgraphs they believe will receive high query volume. They mint curation shares through a bonding curve mechanism, and in exchange they earn a 10% cut of all query fees paid to that subgraph. If they signal early on a subgraph that becomes popular, their shares become more valuable. If they signal on a subgraph that nobody queries, they lose value when they withdraw.

The delegator is the passive participant. Not everyone has the technical skill or capital to run an indexer node, but the protocol still wants their GRT to be productive. Delegators stake their GRT to indexers they trust, sharing in the indexer's rewards in exchange for taking on a small portion of slashing risk. The minimum delegation is 1 GRT, making this role accessible to retail holders. Delegation works similarly to staking on proof-of-stake networks, but the rewards come from real query revenue rather than just inflation.

The Subgraph Lifecycle

Every subgraph follows the same four-stage lifecycle from the developer's keyboard to a consumer's GraphQL request. Understanding this flow is essential whether you plan to build a subgraph or just consume one.

STAGE 1
Define Schema
schema.graphql + mappings
STAGE 2
Deploy
Publish manifest to network
STAGE 3
Index
Indexers sync historical data
STAGE 4
Query
dApps fetch via GraphQL
Each query payment in GRT flows back through indexers, curators and delegators.

The first stage is defining the schema. The developer creates a schema.graphql file that describes the entities they want to expose, like Pool, Swap, User or Token. They then write mappings in AssemblyScript, a TypeScript-like language that compiles to WebAssembly, which translate raw blockchain events into those entities. Finally they write a manifest file (subgraph.yaml) that lists the contracts to watch, the events to handle, and the start block.

The second stage is deployment. The developer uses the Graph CLI to compile their code to WebAssembly, upload it to IPFS, and publish the subgraph on-chain by paying a small fee in GRT. Once published, the subgraph appears in the network's subgraph registry and becomes visible to curators and indexers. At this point the developer can mint a small amount of curation signal on their own subgraph to bootstrap interest from indexers.

The third stage is indexing. Indexers who have decided to support the subgraph allocate stake to it and begin syncing. They read every block from the start block forward, run the mappings to extract entities, and store those entities in their local database. For a popular subgraph this can take hours or days depending on chain history. Once synced, the indexer maintains real-time sync with the chain head, processing new blocks as they arrive.

The fourth stage is querying. Consumers, typically front-end applications, send GraphQL requests to The Graph's gateway, which routes the requests to indexers and returns results. Each query is paid for in GRT through state channels, so the consumer pays fractions of a cent without waiting for on-chain transactions. The economics of this system are similar in spirit to how Chainlink pays node operators for delivering data, although the technical mechanism is very different.

GraphQL Query Example

The Graph uses GraphQL as its query language because GraphQL was designed exactly for the problem The Graph solves: fetching specific, structured data from a complex source. Unlike REST APIs, where you request a fixed endpoint and receive a fixed response, GraphQL lets you ask for exactly the fields you need and receive a JSON response shaped to your request. This eliminates over-fetching, reduces bandwidth and makes front-end development dramatically simpler.

Here is a real query you could send to the Uniswap V3 subgraph to retrieve the top 10 trading pools by total value locked, along with their token symbols and 24-hour volume:

{
  pools(
    first: 10
    orderBy: totalValueLockedUSD
    orderDirection: desc
  ) {
    id
    feeTier
    totalValueLockedUSD
    volumeUSD
    token0 {
      symbol
      decimals
    }
    token1 {
      symbol
      decimals
    }
  }
}

The response comes back as JSON with exactly those fields, nothing more and nothing less. The developer never had to think about which Ethereum block to scan, which event signature to filter, how to decode the log data, or how to aggregate the values. The subgraph already did all of that work and exposed the result as a clean entity called Pool with named fields. This is the productivity unlock that made The Graph the default data layer for almost every major DeFi protocol.

The query language supports filtering with where clauses, pagination with first and skip, nested entity resolution and even time-travel queries through block parameters. A front-end developer can build an entire analytics dashboard with five or six well-crafted queries, where the same dashboard built from raw RPC calls would require thousands of lines of indexing code.

GraphQL query interface for The Graph showing decentralized subgraph explorer with structured blockchain data
GraphQL playground - developers build full dashboards from a single query.

Indexers: Running a Node and Earning GRT

Indexers are the backbone of The Graph. Without them, no data gets indexed and no query gets answered. Becoming an indexer is the most technically demanding role in the protocol and requires real infrastructure investment, but it is also the most direct way to earn from the network's traffic.

To run an indexer node you need to stake a minimum of 100,000 GRT and operate a stack of services. The core component is Graph Node, the open-source software that processes subgraphs. Around Graph Node you need an archive node for every chain you want to index, a PostgreSQL database, the indexer-agent that manages allocations, the indexer-service that handles incoming queries, and the indexer-cli for operational tasks. Most indexers run these services across multiple cloud regions for redundancy.

Once the infrastructure is running, the economics kick in. An indexer earns through two streams. The first is query fees, which are paid by consumers in GRT on a per-query basis and flow directly to the indexer that served the query. The second is indexing rewards, which are newly minted GRT distributed by the protocol to indexers based on how much stake they have allocated to subgraphs and how much curation signal those subgraphs have attracted. The split between these two revenue streams varies, but historically indexing rewards have made up the majority of indexer income.

Indexers also face risks. The protocol uses a system called arbitration to resolve disputes about whether an indexer served correct data. If a fisherman, a special role in the network, proves that an indexer returned incorrect query results, that indexer can be slashed for 2.5% of their stake, with half going to the fisherman and half being burned. This creates strong incentive for indexers to maintain accurate data and is one of the cryptoeconomic guarantees that distinguishes The Graph from centralized alternatives.

Curators: Signaling Quality Through Bonding Curves

Curation is the most underrated role in the protocol and also the most economically interesting. Curators provide the signal that tells indexers which subgraphs are worth indexing. They do this by staking GRT on subgraphs through a bonding curve, which automatically prices their signal based on supply and demand.

The bonding curve mechanism works like this. When a curator deposits GRT into a subgraph, they receive curation shares in exchange. The price of those shares is determined by the curve, so the first curators to signal on a subgraph pay less per share than later curators. If a subgraph attracts many curators, the share price rises, and early curators see paper gains. If a subgraph fails to attract query volume, late curators paying high share prices may exit at a loss.

Curators earn 10% of all query fees paid to subgraphs they have signaled on. This means that even if the share price never moves, a curator on a high-traffic subgraph earns a steady stream of GRT just from query revenue. The strategy is similar to early-stage investing. Curators must identify subgraphs that will become popular before the rest of the market catches on, much like spotting a high-conviction project early. The economic design echoes patterns familiar to anyone who has studied tokenomics in other crypto ecosystems.

There is a small withdrawal tax of 1% when curators exit their position, which is burned. This discourages mercenary signal that pumps and dumps a subgraph's curve, and it is one of the deflationary pressures on GRT supply.

Delegators: Staking GRT Without Hardware

Delegation is The Graph's answer to the question of how to make the network accessible to retail holders. Running an indexer requires servers, technical expertise and a significant capital commitment. Most GRT holders cannot or do not want to take on that burden. Delegation lets them participate anyway by lending their stake to professional indexers.

A delegator chooses an indexer based on the indexer's reward cut, query fee cut, historical performance, total stake and reputation. They send their GRT to that indexer's delegation pool, and from that moment on they earn a proportional share of the rewards the indexer generates, minus the cuts the indexer keeps as compensation. There is a 0.5% delegation tax that is burned when GRT enters a delegation pool, which exists to prevent rapid switching between indexers and to add another small deflationary mechanism.

Delegators do not share in slashing penalties for protocol violations like incorrect data, but they do bear the loss if an indexer fails to perform allocations correctly. This means choosing the right indexer matters. The Graph Explorer publishes detailed metrics on every indexer, including their effective query fee rate, their indexing reward rate, the total stake they have attracted and the parameters they offer to delegators. Sophisticated delegators rotate their stake between indexers as parameters change, similar to how DeFi users farm yield across protocols.

Once delegated, GRT enters an unbonding period of 28 epochs (roughly 28 days at one epoch per day) when the delegator decides to withdraw. This unbonding window is a security feature, not a yield optimization knob, and it exists to prevent stake from being moved fast enough to break the dispute resolution process.

Consumers: dApps Paying Query Fees in GRT

Consumers are the demand side of the marketplace. Every time a wallet, dashboard, DeFi app or analytics platform queries a subgraph, that query is paid for in GRT. The payment is tiny, fractions of a cent per query, but at the scale of the network it adds up to a meaningful flow of value.

Consumers pay through API keys issued by the Edge & Node gateway or by third-party gateways. Behind the scenes, those payments are aggregated and settled with indexers through state channels, so individual queries do not require on-chain transactions. A dApp developer registering on the Subgraph Studio gets free queries for development and switches to a paid plan when their app goes live and starts driving real traffic. Larger consumers like exchanges or wallet providers may negotiate custom arrangements with specific indexers or run their own gateway.

The payment flow is designed to be invisible to the end user. When you open MetaMask and see your token balances, you are silently consuming queries from The Graph. When you trade on Uniswap and the interface shows you historical pool data, those queries flow through the network. The end user never sees GRT or pays a fee directly, but the dApp behind the interface is paying for the indexing infrastructure that makes their experience smooth.

Top Consumer dApps in 2026

The list of applications that depend on The Graph reads like a who's who of Web3. These are some of the most prominent consumers driving real query volume in 2026.

Uniswap

The largest DEX in DeFi uses The Graph to power its analytics interface, pool listings, swap history and the entire info.uniswap.org portal.

Aave

Lending and borrowing dashboards, historical rates, user positions and risk metrics all stream from Aave's official subgraphs.

ENS

The Ethereum Name Service uses subgraphs to index name registrations, ownership changes, resolver records and reverse lookups.

Lido

The leading liquid staking protocol indexes validator data, stETH balances, reward accruals and node operator statistics.

Curve

Curve's stable swap pools rely on The Graph for historical TVL, gauge votes, CRV emissions and bribery analytics.

Decentraland

Parcel ownership, marketplace listings, scene metadata and MANA transfers in the virtual world all flow through subgraph queries.

Synthetix

Synthetic asset positions, oracle prices, debt pool changes and SNX staking data are indexed and served via The Graph.

Balancer

Weighted pools, liquidity bootstrapping events, gauge boosts and BAL emissions feed analytics through Balancer's subgraphs.

Beyond these flagship consumers, thousands of smaller dApps, indexing aggregators, portfolio trackers, tax tools and on-chain forensics platforms tap into The Graph every day. The protocol routinely processes tens of billions of queries per month across the decentralized network, with multi-chain support spanning Ethereum, Polygon, Arbitrum, Optimism, Avalanche, Base, BNB Chain, Gnosis and many more.

GRT Tokenomics

GRT is the protocol's coordination token. It is used to pay query fees, to stake as an indexer, to signal as a curator, to delegate to indexers and to vote in protocol governance. Understanding the inflation and burn economics is essential for any long-term holder.

INFLATION (NEW ISSUANCE)
~3% / year

Newly minted GRT distributed as indexing rewards. Funded by protocol issuance, paid to indexers proportional to allocated stake on curated subgraphs.

BURN MECHANISMS
Multiple sinks

1% withdrawal tax on curation, 0.5% delegation tax, 50% of slashed stake, and 1% of query fees burned. All permanently remove GRT from supply.

NET EFFECT
As query volume grows, fee burns increase relative to inflation. The protocol is designed to trend toward neutral or net deflationary supply at scale.

Initial GRT supply at the December 2020 mainnet launch was 10 billion tokens, with allocations to the team, early investors, the Graph Foundation, the Edge & Node company and community programs. The protocol mints additional GRT each year as indexing rewards, at an annual rate that currently sits around 3% of total supply. This new issuance is what compensates indexers for the infrastructure costs and capital lockup involved in indexing subgraphs.

On the other side of the balance sheet, multiple burn mechanisms permanently destroy GRT. The 1% curation withdrawal tax burns tokens whenever curators exit their positions. The 0.5% delegation tax burns tokens when GRT enters a delegation pool. Half of all slashed stake is burned, with the other half going to the fisherman who reported the violation. And 1% of every query fee paid to indexers is burned as a protocol fee. The total burn rate scales directly with network usage, which means that as more dApps query more subgraphs, more GRT is removed from circulation.

This design is intentional. In its early years the protocol prioritized issuance to bootstrap indexer participation. As the network matures and query volume grows, the burn side of the equation grows proportionally, while issuance can be reduced through governance. The long-term thesis for GRT holders rests on this transition from net inflationary to net deflationary supply.

The Hosted Service Sunset

For most of its history, The Graph operated two parallel systems. The decentralized network launched in December 2020 and grew steadily, but for years many subgraphs continued to run on the hosted service, a free, centralized version of The Graph operated by Edge & Node. The hosted service was crucial for bootstrapping the ecosystem because it let developers ship subgraphs without paying query fees or worrying about indexer adoption, but it also represented a long-term contradiction. A protocol pitched as decentralized infrastructure cannot indefinitely rely on a centralized service.

In 2023 the team announced the formal sunset of the hosted service, with a phased migration plan that ran through mid-2024. By June 2024 the hosted service was fully shut down. Every actively maintained subgraph was migrated to the decentralized network, where it now runs across multiple independent indexers and gets paid for through query fees. Some subgraphs that were no longer maintained were simply deprecated, and consumers had to find alternatives or build their own replacements.

The migration was not entirely smooth. Some teams resisted moving because they did not want to pay query fees that the hosted service had given them for free, and a few high-profile DeFi protocols delayed their migration until the last possible moment. But the broad direction was clear and the sunset succeeded. By 2026 the entire ecosystem runs on the decentralized network, with the hosted service surviving only in archived documentation. This was one of the largest decentralization milestones any major Web3 protocol has executed.

Geo Genesis: The AI Knowledge Graph Pivot

One of the most consequential strategic shifts in The Graph's history began in 2023 and accelerated through 2024 and 2025. The protocol's vision expanded from indexing blockchain data to indexing all public information through a project called Geo Genesis. Geo is a decentralized knowledge graph that lets anyone create and maintain structured semantic data about any topic, governed by communities called Spaces.

Where a traditional subgraph indexes a smart contract, a Geo Space indexes concepts: a city, a film, a scientific paper, a token, a person. The data model is built on triples (subject, predicate, object), the same data model that powers Wikidata and Google's Knowledge Graph. Geo enables the construction of human and machine-readable knowledge that AI agents can consume as a more reliable alternative to scraping the open web.

The connection to AI is direct. Large language models trained on the open web absorb a mixture of high-quality and low-quality information, and they cannot easily distinguish fact from opinion. A knowledge graph built on Geo provides AI agents with structured, attributed, version-controlled data that they can cite and reason over. By 2026, several AI products are running on Geo's infrastructure, and The Graph's roadmap explicitly positions the protocol as the data layer for both Web3 and AI agents.

This pivot does not replace the original subgraph product. Blockchain indexing remains the protocol's largest revenue driver and the most active area of development. But it expands the addressable market by an order of magnitude. The Graph is no longer competing only with centralized blockchain indexers like Alchemy and QuickNode. It is also positioning itself in the much larger market for structured, decentralized knowledge.

Substreams and Firehose: High-Performance Streaming

Around 2022 the team behind StreamingFast joined The Graph and brought with them a new high-performance indexing technology stack called Firehose and Substreams. These technologies sit alongside traditional subgraphs and offer dramatic performance improvements for specific use cases.

Firehose is a streaming format for blockchain data. Instead of pulling blocks from an RPC node one at a time, Firehose extracts every detail of every block in a structured, deterministic stream that downstream consumers can replay at massive speed. A subgraph that takes days to sync from a standard archive node can sync in hours or even minutes when backed by Firehose.

Substreams build on Firehose by letting developers write small Rust modules that compose into streaming data pipelines. A Substream module can decode contract calls, aggregate values, filter events and emit results, all in parallel and at orders-of-magnitude faster throughput than traditional AssemblyScript mappings. For data-heavy applications like real-time DEX analytics, NFT marketplaces or cross-chain bridges, Substreams have become the default choice. They also produce sinks that can feed into traditional subgraphs, databases like PostgreSQL or BigQuery, or even directly into trading systems.

The introduction of Substreams was a major statement that The Graph intends to remain the most performant indexing technology on the market, not just the most decentralized. Indexers who support Substreams attract more advanced subgraphs, and developers gain a tool that no centralized competitor currently matches in raw throughput.

The Graph subgraph studio dashboard showing indexer rewards staking and GRT delegator network statistics
Subgraph Studio and Explorer - where developers manage subgraphs and stakeholders track network activity.

The Graph vs Centralized Alternatives

The Graph competes with a growing list of centralized indexing services. Alchemy launched its own Subgraphs product, QuickNode offers indexed data APIs, Goldsky provides hosted real-time indexing, and many smaller players sell specialized data feeds. Understanding the tradeoffs helps you choose the right tool for your project.

Centralized alternatives win on convenience. They offer single-vendor support, a familiar billing model, often slightly faster query latency at small scale, and direct customer service. For a hackathon project or an early-stage startup that values speed of iteration, a centralized indexer can be the fastest path to a working product. They also tend to support faster experimental features because they only need to ship to one operator instead of coordinating with hundreds of indexers.

The Graph wins on decentralization, censorship resistance, long-term reliability and price at scale. A subgraph published on The Graph cannot be unilaterally shut down by any single party. If one indexer goes offline, others serve the same data. There is no single point of failure, no rug-pull risk and no vendor lock-in. For a serious DeFi protocol that intends to outlive its development team, indexing on The Graph is the only credible choice. The same logic applies to DAOs and other long-lived on-chain organizations that need data infrastructure they can rely on indefinitely.

The cost picture is more nuanced. At low query volumes, centralized providers often have generous free tiers that beat The Graph on dollar cost. At high query volumes, The Graph's competitive marketplace among hundreds of indexers tends to deliver lower per-query prices than monopolistic centralized providers. Sophisticated teams sometimes use both, running a centralized indexer for development and a Graph subgraph for production.

How to Use The Graph in Your dApp

Integrating The Graph into a dApp is dramatically simpler than building your own indexer. Here is the quick-start path for a developer who has never touched the protocol before.

Step 1: Find or create a subgraph. Open the Graph Explorer and search for the protocol you want to query. Most major DeFi, NFT and infrastructure protocols already have official subgraphs maintained by their teams. If you find one that fits your needs, copy the query endpoint and proceed to step 3. If not, you will need to build your own subgraph, which means installing the Graph CLI, scaffolding a new project, defining a schema and writing mappings.

Step 2: Get an API key. Register on the Subgraph Studio at thegraph.com, create an API key, and add it to your environment variables. The free tier covers significant development usage, and you only pay when your app starts generating real query volume in production.

Step 3: Send queries from your app. Use a GraphQL client like Apollo, urql or even plain fetch to send queries to the subgraph endpoint. Most front-end frameworks have first-class GraphQL support, and the integration usually amounts to a few dozen lines of code. The queries are the same GraphQL you saw earlier in this guide, just executed from your front-end with your API key in the request headers.

Step 4: Cache and paginate. Production dApps should cache subgraph responses aggressively and paginate large queries to avoid unnecessary cost and latency. GraphQL clients like Apollo include built-in caching, and most subgraphs support pagination through first and skip parameters.

Step 5: Monitor and optimize. The Subgraph Studio dashboard shows your query volume, latency and costs over time. As your app grows you may want to fork popular subgraphs to add custom fields, or build a Substreams-powered version for higher throughput. Real-world dApps often combine multiple subgraphs to assemble the data they need, much as they might combine multiple ERC-20 token contracts within a single product.

Frequently Asked Questions

What is The Graph used for?

The Graph is used to index and query data from blockchains. Any application that needs to display historical or aggregated on-chain data, like DEX trade histories, NFT collections, lending positions, ENS records or DAO votes, uses The Graph or a similar indexing service. It replaces the need for each dApp to build and maintain its own indexing infrastructure.

How does The Graph make money?

The protocol itself does not have a profit motive. It is a public utility owned by GRT holders. The participants in the network make money in different ways: indexers earn query fees and indexing rewards, curators earn 10% of query fees on subgraphs they signal, delegators earn a share of indexer rewards, and developers can earn by building widely used subgraphs. The Graph Foundation and Edge & Node are funded through GRT allocations from the initial supply and ongoing protocol grants.

Is The Graph decentralized?

Yes, since the sunset of the hosted service in mid-2024, The Graph operates as a fully decentralized network. Indexing is performed by hundreds of independent indexer nodes around the world, governance is conducted by GRT holders and the Graph Council, and the protocol is governed by smart contracts deployed on Ethereum and Arbitrum. There is no single company that can shut down a subgraph or censor queries.

What is a subgraph?

A subgraph is an open API that defines what data should be extracted from one or more smart contracts and how that data should be organized. It consists of a manifest (subgraph.yaml), a schema (schema.graphql) and mappings written in AssemblyScript. Once deployed, a subgraph can be queried by anyone using GraphQL.

Can I run an indexer?

Yes, but it requires technical expertise and a minimum stake of 100,000 GRT. You need to run Graph Node alongside archive nodes for each chain you want to index, manage a PostgreSQL database, operate the indexer-agent and indexer-service software, and actively manage your allocations across subgraphs. Many indexers operate as professional businesses with dedicated infrastructure teams. If you do not meet these requirements, delegation is a much easier way to earn GRT.

Is GRT a good investment?

This guide does not give investment advice, but the investment thesis for GRT rests on three pillars. First, the network's revenue scales directly with the number of dApps and the volume of queries they serve, which has trended up consistently. Second, the burn mechanisms tied to query fees, curation taxes and delegation taxes create deflationary pressure that strengthens as usage grows. Third, the Geo Genesis pivot expands the addressable market beyond blockchain indexing into AI and structured knowledge. Risks include competition from centralized indexers, dependence on continued growth of the broader Web3 ecosystem, and execution risk on the AI strategy.

Conclusion

The Graph occupies a unique position in the Web3 stack. It is not a blockchain, it is not a smart contract platform, and it is not a wallet, but almost every blockchain, smart contract platform and wallet depends on it. By turning the unstructured chaos of on-chain data into clean, queryable APIs, it removed one of the largest friction points facing dApp developers and quietly became the default data layer for the decentralized internet.

The four-role economic system of subgraph developers, indexers, curators and delegators creates a self-sustaining marketplace where every participant has skin in the game. GRT tokenomics balance inflationary issuance against multiple burn mechanisms that scale with usage. The sunset of the hosted service in 2024 completed the protocol's transition to full decentralization. And the Geo Genesis pivot positions the network to capture value from the explosion of AI agents that need access to structured, verifiable data.

For developers, The Graph is the easiest way to add powerful data capabilities to a dApp without building infrastructure from scratch. For indexers and infrastructure operators, it is a real business that pays in proportion to the work performed. For curators and delegators, it offers a way to earn yield on GRT that comes from genuine economic activity rather than pure inflation. And for anyone watching the long-term shape of the decentralized web, The Graph is one of the most important pieces of plumbing to understand. Whatever the next wave of Web3 looks like, it will almost certainly run on top of the indexing layer that The Graph pioneered.

Related Guides