Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Graph Node

A Graph Node is a fundamental entity in a graph data structure, representing an object such as a user, profile, or piece of content within decentralized social networks and protocols.
Chainscore © 2026
definition
THE GRAPH PROTOCOL

What is a Graph Node?

A Graph Node is the core indexing and query processing server within The Graph's decentralized data network.

A Graph Node is a server that ingests blockchain data, processes it according to a specified subgraph manifest, and serves queries via a GraphQL API. It continuously scans the blockchain for events defined in the subgraph, runs a mapping function written in AssemblyScript to transform this data into entities, and stores the resulting structured data in a PostgreSQL database for efficient querying. This process effectively creates a searchable, real-time index of on-chain information.

The node's architecture is modular, separating concerns into distinct components: the ingestion component syncs with blockchain nodes, the mapping component executes the transformation logic, and the query component handles incoming GraphQL requests. This design allows for horizontal scaling and high availability. Graph Nodes can be run by anyone, forming the decentralized backbone of the network where Indexers operate nodes to serve queries for a fee, while Curators signal on high-quality subgraphs to guide indexing resources.

From a developer's perspective, a Graph Node is the execution environment for their subgraph. After a developer deploys a subgraph definition, Graph Nodes pick it up, begin syncing historical data, and stay in sync with new blocks. This provides a reliable abstraction layer, allowing dApp frontends to query complex, aggregated blockchain data with simple GraphQL calls instead of processing raw event logs directly, drastically simplifying data access and improving application performance.

how-it-works
THE GRAPH PROTOCOL

How a Graph Node Works

A Graph Node is the core indexing server within The Graph's decentralized network, responsible for ingesting blockchain data, processing it according to subgraph manifests, and serving queries via a GraphQL API.

A Graph Node is a specialized server that performs the core indexing function for The Graph protocol. It operates by first ingesting raw event data from a blockchain, such as Ethereum, by connecting to an Ethereum node or other supported chain's RPC endpoint. The node then processes this data according to the logic defined in a subgraph manifest (subgraph.yaml), which maps specific smart contract events and function calls to a structured data schema. This processed data is stored in a PostgreSQL database for efficient querying, creating a searchable index of on-chain information.

The indexing process is continuous and stateful. The node monitors the blockchain for new blocks, filters them for events relevant to its assigned subgraphs, and executes the data transformation mappings written in AssemblyScript or other supported languages. These mappings translate low-level log data into the high-level entities defined in the GraphQL schema. This allows the node to maintain an always-updated, queryable representation of on-chain state, such as token balances, NFT ownership, or DeFi pool statistics, without requiring users to manually parse complex transaction logs.

Once indexed, the data is exposed via a GraphQL API endpoint. Developers and applications send GraphQL queries to the node to retrieve specific slices of the indexed data. For example, a dApp might query "all liquidity pools created by a specific address in the last week." The node's query engine efficiently resolves these requests against its optimized database, returning JSON results. In the decentralized network, Indexers operate Graph Nodes, staking GRT tokens to provide this service and earn query fees, while Delegators can stake GRT to Indexers to support the network's security and share in rewards.

key-features
ARCHITECTURE

Key Features of a Graph Node

A Graph Node is the core indexing and query engine of The Graph protocol. It processes blockchain data to serve queries for decentralized applications (dApps).

01

Subgraph Manifest & Mapping

A Graph Node ingests a subgraph manifest (subgraph.yaml), which defines the smart contracts, events, and data transformations to index. It executes AssemblyScript mappings to convert raw blockchain events into queryable entities stored in a PostgreSQL database.

02

Deterministic Indexing

The node performs deterministic indexing, meaning given the same Ethereum block data and subgraph manifest, it will always produce an identical database state. This ensures data integrity and allows for decentralized redundancy across multiple node operators.

03

GraphQL Query Engine

It exposes a GraphQL API endpoint that applications query to fetch indexed data. The schema for this API is auto-generated from the subgraph's entity definitions, providing a type-safe and efficient interface for dApp frontends.

04

EVM & Multi-Chain Support

While originally built for Ethereum, a Graph Node can index data from any EVM-compatible chain (e.g., Polygon, Arbitrum, Avalanche) and non-EVM chains via Firehose or Substreams data sources. This requires a compatible chain-specific adapter.

05

Historical & Real-Time Data

The node indexes the entire history of a blockchain from a defined start block. Once synced, it listens for new blocks in real-time, updating the indexed data store and serving the latest information with minimal latency.

06

Decentralized Service Role

In The Graph's decentralized network, an Indexer runs a Graph Node to serve queries for specific subgraphs, earning query fees and indexing rewards. The node interacts with the network's curation system and dispute resolution mechanisms.

examples
GRAPH NODE

Examples in Web3 Protocols

A Graph Node is the core indexing server that processes blockchain data for The Graph protocol. These examples illustrate its critical role in powering decentralized applications across major networks.

05

Handling Chain Reorganizations

A critical function of a Graph Node is managing chain reorganizations (reorgs). When a blockchain like Ethereum experiences a reorg, the node must:

  • Detect the fork in the canonical chain.
  • Revert any data that was indexed from orphaned blocks.
  • Re-index data from the new canonical chain.
  • This ensures the deterministic and accurate state of the subgraph's stored data, maintaining data integrity for applications that rely on finality. The node's block ingestion logic is designed to handle these events automatically.
ARCHITECTURE COMPARISON

Graph Node vs. Related Concepts

A technical comparison of The Graph's indexing node with other data indexing and querying systems.

Feature / ComponentGraph NodeTraditional Database (e.g., PostgreSQL)Centralized API Server

Core Function

Indexes & serves blockchain data via GraphQL

Stores and queries structured application data

Serves custom business logic via REST/GraphQL

Data Provenance

Immutable, verifiable on-chain data

Mutable, application-controlled data

Data source is opaque to the client

Decentralization

Operated by independent Indexers

Centrally controlled by application

Centrally controlled by service provider

Query Interface

GraphQL schema defined by subgraph

SQL or ORM queries

Proprietary or custom API endpoints

Data Freshness

Real-time syncing via event processing

Immediate for writes within the system

Depends on upstream data source sync

Censorship Resistance

High (decentralized network)

None (centralized control)

None (centralized control)

Primary Use Case

Querying historical & real-time blockchain state

General-purpose application backend

Providing a specific external service API

ecosystem-usage
GRAPH NODE

Ecosystem Usage & Standards

A Graph Node is the core open-source server software that indexes and serves blockchain data via GraphQL APIs. It is the foundational component for building and operating a subgraph.

01

Core Architecture

A Graph Node is a Rust-based application that connects to Ethereum clients (like Geth or Erigon) and IPFS to ingest and process blockchain data. Its primary functions are:

  • Indexing: Continuously scans specified smart contracts for events, executing mapping logic written in AssemblyScript.
  • Querying: Serves the processed data through a high-performance GraphQL API endpoint.
  • State Management: Maintains its own database (typically PostgreSQL) to store the indexed entity state, enabling fast queries independent of the underlying blockchain.
02

Subgraph Manifest

The node operates based on a subgraph manifest (subgraph.yaml), a YAML file that defines the data sources and mapping logic. Key components include:

  • Data Sources: Specifies the smart contract addresses, ABIs, and the block to start indexing from.
  • Event Handlers: Links specific contract events to handler functions in the mapping script.
  • Entity Schema: Defines the data model (in GraphQL Schema Definition Language) that will be populated and queried.
03

The Graph Network Role

In The Graph's decentralized network, independent operators run Graph Nodes to serve queries for specific subgraphs. They earn query fees paid in GRT for their indexing and query processing work. The network uses a curation system where curators signal on valuable subgraphs, guiding indexers on what data to prioritize.

04

Hosted Service vs. Decentralized Network

Graph Nodes power two main deployment models:

  • The Graph Hosted Service: A free, managed service run by The Graph Foundation where developers deploy subgraphs to centralized Graph Nodes.
  • The Graph Decentralized Network: A permissionless network where anyone can deploy a subgraph and indexers run Graph Nodes to serve it, ensuring censorship resistance and reliable uptime.
05

Operational Components

Running a production Graph Node involves several key services:

  • PostgreSQL Database: Stores all indexed entity data and subgraph metadata.
  • IPFS Node: Fetches subgraph manifests and mapping files pinned to IPFS.
  • Ethereum Archive Node: Provides full historical blockchain data for accurate indexing. The node requires a firehose-compatible source or a standard JSON-RPC connection for real-time blocks.
06

Query Performance & Caching

Graph Nodes are optimized for complex querying. They implement advanced GraphQL query planning and caching layers to minimize database load. For the decentralized network, nodes use a cost model to meter queries based on complexity, which determines the GRT cost paid by the consumer. This ensures the system remains sustainable under heavy load.

technical-details
GRAPH NODE

Technical Details & Data Model

A Graph Node is the core indexing server that ingests blockchain data, processes it according to a subgraph manifest, and makes it queryable via GraphQL. It is the fundamental execution engine of The Graph protocol.

A Graph Node is an open-source Rust-based server that performs the core indexing work for The Graph protocol. Its primary function is to ingest raw blockchain data from an Ethereum Virtual Machine (EVM) chain, process it through user-defined mappings written in AssemblyScript or Rust, and store the resulting structured data in a PostgreSQL database. This process transforms on-chain events and transactions into a queryable graph data model, enabling efficient API access. Each node operates independently, tracking specific subgraphs and updating its datastore as new blocks are added to the chain.

The node's architecture is defined by several key components. The subgraph manifest (subgraph.yaml) acts as the blueprint, specifying the smart contract addresses, the events to index, and the mapping logic. The mapping handlers contain the transformation code that translates blockchain data into the entities defined in the GraphQL schema. Internally, the node uses a blockchain client (like an Ethereum Geth or Erigon node) for data ingestion and a Postgres database with a time-travel query-enabled schema to store all entity states at every block height, allowing for historical queries.

For developers, interacting with a Graph Node typically means deploying a subgraph. The process involves compiling the subgraph definition using the Graph CLI, which generates necessary artifacts, and then using the CLI to create, deploy, and manage the subgraph on a node. Once deployed, the node begins syncing, processing blocks from the start block defined in the manifest. Indexers in the decentralized network run Graph Nodes to serve queries for their allocated subgraphs, while developers can also run a local node for testing using tools like Ganache or a local testnet.

The data model within a Graph Node is entity-centric. Each entity is a type defined in the GraphQL schema, representing an object like a User, Transaction, or Pool. Entities are stored as rows in PostgreSQL tables, with relationships between them established via ID fields. A critical feature is deterministic indexing: given the same blockchain data and subgraph code, any Graph Node will produce an identical data store. This ensures consistency across the network. The node also handles re-orgs by reverting entity states using its stored history, maintaining data integrity against blockchain reorganizations.

In the decentralized Graph Network, Graph Nodes are operated by Indexers, who stake GRT tokens to provide indexing and query processing services. These nodes expose a GraphQL endpoint over HTTP. When a query arrives, the node's query engine parses the GraphQL, resolves it against the indexed data in Postgres, and returns the JSON result. Performance is optimized through pagination, field-level filtering, and efficient database indexing on entity fields. For subgraphs with complex logic or high traffic, node operators may need to optimize their database performance and ensure sufficient resources for the block processing and query serving workloads.

GRAPH NODE

Common Misconceptions

Clarifying frequent misunderstandings about the core infrastructure for indexing and querying blockchain data.

No, a Graph Node is not a blockchain node. A blockchain node (like a Geth or Erigon client) validates transactions and maintains the canonical state of the chain. A Graph Node is a specialized indexing node that processes blockchain data after it is finalized, extracting and organizing it based on predefined subgraphs to enable fast queries via GraphQL. It reads data from blockchain nodes via an RPC endpoint but does not participate in consensus.

GRAPH NODE

Frequently Asked Questions

Essential questions and answers about Graph Node, the core indexing and querying engine for The Graph protocol.

A Graph Node is an open-source Rust-based server that indexes blockchain data from an Ethereum Virtual Machine (EVM) network and serves it via a GraphQL API. It works by listening for specific events from smart contracts (defined in a subgraph manifest), processing and storing the related data in a PostgreSQL database, and then allowing applications to query this indexed data efficiently using GraphQL. The node's operation is a continuous cycle of syncing with the chain, indexing new blocks, and serving queries, enabling fast and reliable access to on-chain data without requiring direct RPC calls for historical information.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team