gitmyhub

subql

TypeScript ★ 19k updated 3mo ago

SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.

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.

TypeScriptPostgreSQLGraphQLNode.jssetup: hardcomplexity 4/5

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.

Where it fits