explaingit

subquery/subql

Analysis updated 2026-06-21

18,805TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

An open source framework that reads raw blockchain data, indexes it into a PostgreSQL database, and serves it through a GraphQL API, making it easy to build DeFi dashboards, NFT explorers, and other web3 apps.

Mindmap

mindmap
  root((SubQuery))
    What It Does
      Reads blockchain data
      Indexes to PostgreSQL
      Serves GraphQL API
    Supported Chains
      Polkadot Ethereum
      Cosmos NEAR
      Solana Algorand
    Use Cases
      DeFi dashboards
      NFT explorers
      Governance tools
    Deployment
      Local development
      Self-hosted
      SubQuery Network
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a DeFi dashboard showing real-time and historical token transfers and swap events for a Polkadot or Ethereum wallet.

USE CASE 2

Create an NFT explorer that lets users search all transfers and sales for a specific NFT contract on Ethereum or Solana.

USE CASE 3

Power a governance tool that tracks voting history and proposal events from a Cosmos-based blockchain.

USE CASE 4

Index data from multiple blockchains simultaneously into one queryable database for a multi-chain web3 app.

What is it built with?

TypeScriptPostgreSQLGraphQLNode.js

How does it compare?

subquery/subqlunocss/unocsscompiler-explorer/compiler-explorer
Stars18,80518,79018,766
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardeasyeasy
Complexity4/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires running both an indexer node and a GraphQL query service, Docker is needed for local development.

In plain English

SubQuery is an open source data indexing framework for blockchain (web3) applications. The core problem it solves is that blockchains store raw transaction and event data in a format that is very hard to query, if your app needs to ask questions like "show me all NFT transfers for this wallet" or "what happened to this smart contract over the past week," you can't just run a SQL query against the chain. SubQuery sits between the blockchain and your app: it reads raw on-chain data, processes it according to rules you define, stores it in a PostgreSQL database, and exposes it through a standard GraphQL API that your frontend can query quickly. It supports a wide range of blockchains including Polkadot, Ethereum and EVM-compatible networks, Cosmos, Algorand, NEAR, Stellar, Solana, Starknet, and others, and you can even index data across multiple chains at once. You define what data to capture using a project manifest and TypeScript mapping functions, then run the SubQuery indexer node alongside a GraphQL query service. Projects can be run locally for development, self-hosted on your own infrastructure, or published to the decentralized SubQuery Network where others host your indexer for you. You would use SubQuery if you are building a decentralized app, such as a DeFi dashboard, an NFT explorer, or a governance tool, and need reliable, fast access to historical and real-time blockchain data without building your own data pipeline from scratch.

Copy-paste prompts

Prompt 1
How do I set up a SubQuery project to index all ERC-20 token transfers on Ethereum and expose them through a GraphQL API?
Prompt 2
Show me how to define a SubQuery manifest and TypeScript mapping function to capture NFT mint events from a Solana program.
Prompt 3
How do I run a SubQuery indexer node locally for Polkadot development and write GraphQL queries to retrieve the indexed data?
Prompt 4
I want to build a DeFi dashboard using SubQuery, how do I index Uniswap swap events and structure GraphQL queries to display them?
Prompt 5
How do I deploy my SubQuery project to the decentralized SubQuery Network so other node operators can host my indexer?

Frequently asked questions

What is subql?

An open source framework that reads raw blockchain data, indexes it into a PostgreSQL database, and serves it through a GraphQL API, making it easy to build DeFi dashboards, NFT explorers, and other web3 apps.

What language is subql written in?

Mainly TypeScript. The stack also includes TypeScript, PostgreSQL, GraphQL.

How hard is subql to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is subql for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub subquery on gitmyhub

Verify against the repo before relying on details.