I had a question last week that stopped me in my tracks.
I was looking at Uniswap’s interface, and I noticed it showed my complete trade history instantly. Every swap I’d ever made. Across multiple chains. In milliseconds. I thought: "How does this work?"
The blockchain doesn’t have a "SELECT * FROM trades WHERE user = 0xRibhav" function. You can’t query Ethereum like a SQL database.
So how does Uniswap know what I’ve traded? How does OpenSea instantly show me all my NFTs across 10 different chains?
The answer: indexing.
This is Day 34 of the 60‑Day Web3 journey, still in Phase 3: Development. Today we’re talking about The Graph, blockchain indexers, and why every dApp you use depends on infrastructure you probably don’t think about.
The Problem: Blockc…
I had a question last week that stopped me in my tracks.
I was looking at Uniswap’s interface, and I noticed it showed my complete trade history instantly. Every swap I’d ever made. Across multiple chains. In milliseconds. I thought: "How does this work?"
The blockchain doesn’t have a "SELECT * FROM trades WHERE user = 0xRibhav" function. You can’t query Ethereum like a SQL database.
So how does Uniswap know what I’ve traded? How does OpenSea instantly show me all my NFTs across 10 different chains?
The answer: indexing.
This is Day 34 of the 60‑Day Web3 journey, still in Phase 3: Development. Today we’re talking about The Graph, blockchain indexers, and why every dApp you use depends on infrastructure you probably don’t think about.
The Problem: Blockchains Are Terrible Databases
Here’s what I learned the hard way.
Blockchains are amazing at recording transactions, proving ownership, and executing logic. They’re terrible at answering questions like:
- "Show me all NFT transfers for address 0xABC"
- "What’s the total trading volume on Uniswap today?"
- "Which wallets hold more than 1000 of this token?"
Why?
Because blockchains don’t store data in a queryable format. They store it as a chain of blocks, each containing a list of transactions. To answer "show me all NFT transfers," you’d have to:
- Download the entire blockchain (hundreds of gigabytes)
- Run a full node (expensive and slow)
- Scan every single block from genesis to now
- Parse every transaction
- Filter for NFT transfers
- Filter for your specific address
- Build your own database to cache results
For Ethereum’s 18+ million blocks, this could take hours or days. And you’d have to do it every time you wanted updated data. That’s not a product. That’s infrastructure hell.
What Indexers Actually Do
Indexers solve this by doing the boring work once, for everyone.
They:
- Run full blockchain nodes
- Listen for new blocks in real-time
- Parse every transaction and event
- Store the data in a queryable database (like PostgreSQL or GraphQL)
- Expose APIs so dApps can query instantly
Instead of every dApp running its own node and parsing data, they just query the indexer’s API.
Think of it like Google for blockchains. Google crawls billions of web pages and indexes them. You don’t have to visit every website manually to find what you need. You just search.
Indexers do the same thing for blockchain data.
The Graph: The Google of Blockchain Data
The Graph is the most popular blockchain indexer.
Launched in 2020, it’s now used by over 3,000 dApps, including:
- Uniswap (trade history, liquidity data)
- Aave (lending/borrowing stats)
- OpenSea (NFT ownership and transfers)
- Decentraland (virtual land ownership)
Here’s how it works:
1. Subgraphs Developers create "subgraphs" — basically, instructions for what data to index and how to organize it.
A subgraph says: "Listen to this smart contract. When it emits an event, save these fields to the database."
2. Indexers Indexers (node operators) run The Graph’s software and process subgraphs. They’re paid in GRT tokens to keep data up-to-date.
3. Query API dApps query the indexed data using GraphQL (a query language, like SQL but for APIs).
Example query:
{
user(id: "0xRibhav") {
swaps {
amountIn
amountOut
timestamp
}
}
}
This returns all my Uniswap swaps in milliseconds. No node. No blockchain scanning. Just a clean API response.
Real Example: How Uniswap Uses The Graph
When you open Uniswap and see your trade history, here’s what happens behind the scenes:
- Your browser sends a GraphQL query to The Graph’s API
- The Graph looks up your address in its indexed database
- It returns all your swaps, formatted as JSON
- Uniswap’s frontend displays it in the UI
All of this happens in under 100 milliseconds.
Without The Graph, Uniswap would have to:
- Run multiple Ethereum nodes (one per chain they support)
- Parse every block for swap events
- Build and maintain their own database
- Handle scaling as usage grows
The Graph handles all of this. Uniswap just queries an API.
How The Graph Actually Works (Under the Hood)
I spent some time digging into this because I wanted to understand what’s happening when I query data.
Step 1: A smart contract emits an event
When you swap on Uniswap, the smart contract emits a Swap event:
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
Step 2: The Graph’s indexer is listening
A subgraph has been created for Uniswap. It listens for this Swap event and says: "When this happens, save the sender, amounts, and timestamp to the database."
Step 3: Data gets stored
The indexer processes the event and writes it to a structured database.
Step 4: You query it
When you open Uniswap, your browser sends a GraphQL query asking for all swaps where sender = your address.
The Graph returns the data instantly because it’s already indexed.
Why This Matters More in 2026
Indexing used to be a "nice to have." In 2026, it’s critical infrastructure.
Here’s why:
1. Multi-chain is the norm
dApps now support 5, 10, or 20+ chains. Running full nodes for every chain is impossible for most teams. Indexers aggregate data across all chains in one API.
2. Real-time data is expected
Users expect instant load times. No one waits 30 seconds for their NFT portfolio to load. Indexers make this possible.
3. Complex queries are common
Modern dApps need to answer questions like:
- "What’s the 30-day trading volume of this liquidity pool?"
- "Show me all governance proposals this DAO voted on"
- "Which wallets bought this NFT in the past week?"
Without indexers, these queries are painful to build.
4. Cost savings
Running your own indexing infrastructure costs thousands per month. Using The Graph costs a few dollars per million queries. For most teams, it’s a no-brainer.
The Competition: Indexers in 2026
The Graph isn’t the only player anymore. In 2026, several alternatives have emerged:
Subsquid
- Open-source indexer
- Claims to be 10x faster than The Graph
- Better for high-frequency data (like DeFi)
Ponder
- Built for TypeScript developers
- Simpler setup than The Graph
- Great for indie builders
Goldsky
- Enterprise-focused
- Real-time streaming data
- Used by large protocols with high traffic
Dune Analytics
- SQL-based queries (familiar for data analysts)
- Great for dashboards and analytics
- Not as good for real-time dApp frontends
The trend: More options, more competition, better performance.
When You Should (and Shouldn’t) Use Indexers
Use an indexer when:
- You need historical data (trade history, NFT transfers)
- You’re building a multi-chain app
- You want to avoid running infrastructure
- You need complex queries (aggregations, filters, joins)
Don’t use an indexer when:
- You only need real-time data (current price, latest block)
- You’re querying a single, simple contract state (like a balance)
- You’re okay running your own node
For most dApps, the answer is: use an indexer.
What I Learned Building With The Graph
I tried building a simple subgraph last week for a test NFT contract.
Here’s what I learned:
1. GraphQL is easy if you know SQL
The query syntax is intuitive. If you’ve ever written SELECT * FROM table, you’ll pick up GraphQL fast.
2. Subgraph creation has a learning curve You need to write a schema (what data to store) and mappings (how to process events). It’s not hard, but it takes a few tries to get right.
3. Deployment is instant Once you deploy a subgraph, it starts indexing within minutes. Queries work immediately.
4. The hosted service is being phased out The Graph is moving to a fully decentralized network. You’ll need GRT tokens to query data in production.
5. Alternatives are worth exploring If you’re building something new, check out Subsquid or Ponder. They’re easier to set up for small projects.
Key Takeaway
Blockchains are permanent ledgers, not databases.
When you see a dApp load your trade history, portfolio, or NFT collection instantly, there’s an indexer working behind the scenes.
The Graph is the most popular, but it’s not the only option anymore. In 2026, indexing infrastructure is mature, competitive, and critical to every Web3 app.
If you’re building anything that needs to query blockchain data, you’re not running your own node. You’re using an indexer.
That’s the invisible layer that makes Web3 feel fast.
What’s Coming Next
Today we learned that blockchains can’t answer questions efficiently, and indexers solve that problem.
Tomorrow, we shift gears completely. You’ve learned to write contracts, test them, analyze security, and understand infrastructure.
But what about actually deploying to mainnet? (There’s no "undo" button on Ethereum)
Resources to Go Deeper
The Graph Documentation : Official guide to building and deploying subgraphs.
Subsquid Docs : Faster alternative to The Graph, open-source indexer.
Ponder : TypeScript-native indexer for indie builders.
Uniswap Subgraph : Real-world example of how Uniswap indexes data.
Follow the series on Medium | Twitter | Future
Jump into Web3ForHumans on Telegram and let’s learn together.