Skip to main content
Version: FireSquid

Subsquid vs The Graph

The Graph is an indexing protocol and framework for EVM chains. In The Graph, indexing projects are called subgraphs. A subgraph typically listens to events emitted by a smart contract and presents the indexed data with a user-defined GraphQL API. A subgraph can be compared to a squid, but with significantly less flexibility due to the design of indexing nodes used in The Graph.

Feature matrix

SubsquidThe Graph
Programming languageTypescriptAssemblyScript (complied to WASM)
Indexing speed~1k-50k bps~100-150 bps
ABI-based generatorYesYes
Real-time indexing (unfinalized blocks)Yes (*)No
Off-chain dataYesNo
Data targetsCustomizablePostgres-only
Customizable DB migrationsYesNo
Factory contract indexingYes, via wildcardsYes
Multi-contract indexingYesLimited
Analytic data targetsBigQuery, Parquet, CSVNo
Local setupEasyRequires an archival node
GraphQL APIGenerated from schema.graphqlGenerated from schema.graphql
Custom resolvers and mutationsYesNo
SubscriptionsYesVia middleware
Hosted serviceYesYes (to be sunset)
Secret env variablesYesNo
PaymentFiat, subscription-based (**)GRT, pay-per-query
DecentralizationOpt-in, via decentralized data targets (Kwil DB, Ceramic)The Graph network

(*) to be supported by the Squid SDK in Q1 2023

(**) for the Aquarium Premium plan

Architecture difference

Subsquid vs The Graph

By design, The Graph indexing node is a black-box that executes subgraphs compiled into WASM. The data is sourced directly from the archival node and local IPFS, and the processed data is stored in a built-in Postgres database. The data stored in the database is considered to be "sealed", so that no external process can modify or read the data except through the GraphQL interface.

On the contrary, Subsquid employs a radically open modular architecure with separated data extraction and filtering (Archives) and data transformation and presentation (Squid SDK). The Squid SDK offers pluggable data targets for both online and offline use-cases.