Skip to main content

GraphQL and General-Purpose Indexer

The GraphQL and sui-indexer-alt (Indexer) stack are part of the Sui data access infrastructure. The stack provides access to on-chain data through a high-performance GraphQL service backed by a scalable and general-purpose indexer. This stack is optimized for developers who need flexible queries, structured output, and historical access to data (with configurable retention) across the Sui network.

GraphQL is ideal for applications that require rich query patterns over structured data, such as fetching owned objects, transaction history, specific onchain attributes, and more. The GraphQL service runs on top of a Postgres-compatible database that is updated by different Indexer pipelines in parallel.

The General-purpose Indexer includes configurable checkpoint-based pipelines that extract data from the Sui remote checkpoint store and full nodes. The pipelines write processed data to a database optimized for GraphQL query access.

Together, the GraphQL service and Indexer offer a modular and production-ready data stack for builders, wallet developers, explorers, and indexer/data providers.

info

JSON-RPC is deprecated. Migrate to either gRPC or GraphQL RPC by April 2026.

Refer to the list of RPC or data providers that have enabled gRPC on their full nodes or offer GraphQL RPC. Contact a provider directly to request access. If your RPC or data provider doesn’t yet support these data access methods, ask them to enable support or contact the Sui Foundation team on Discord, Telegram, or Slack for help.

info

Refer to Access Sui Data for an overview of options to access Sui network data.

See GraphQL and General-Purpose Indexer for more information on the stack.

Indexer setup​

The indexer consists of multiple pipelines that each read, transform, and write checkpoint data to a table. Multiple instances of the indexer can run in parallel, each configured by its own TOML file.

Hardware requirements​

  • CPU: 8 cores
  • Memory: 16GB

Run command​

Run an indexer instance using this command for each of the configuration files that follow:

$ sui-indexer-alt indexer \
--config <CONFIG_FILE> \
--database-url <DATABASE_URL> \
--remote-store-url <REMOTE_STORE_URL>
CLI paramDescription
<CONFIG_FILE>Path to indexer configuration file.
<DATABASE_URL>Postgres database connection string.
<REMOTE_STORE_URL>URL of a checkpoint bucket to index from, one of multiple possible data sources.

Example:

$ sui-indexer-alt indexer \
--config misc.toml \
--database-url postgres://username:password@localhost:5432/database \
--remote-store-url https://checkpoints.mainnet.sui.io

Run config recommendations​

We recommend using the TOML files below which are grouped by pipeline speed. All pipelines in an instance are limited by the slowest pipeline in that instance so these files each contain pipelines that run at approximately the same speed.

Config TOMLDescriptionPipelinesBackfill timeData retention
events.tomlLightweight event tables.
  • ev_emit_mod
  • ev_struct_inst
1-2 days90 days
Click to open
events.toml
[pruner]
retention = 31104000

[pipeline.ev_emit_mod]

[pipeline.ev_struct_inst]
misc.tomlLightweight miscellaneous tables.
  • cp_sequence_numbers
  • tx_balance_changes
  • tx_digests
  • kv_epoch_ends
  • kv_epoch_starts
  • kv_feature_flags
  • kv_packages
  • kv_protocol_configs
  • sum_displays
2-4 days90 days
Click to open
misc.toml
[ingestion]
ingest-concurrency = 20

[pruner]
retention = 31104000

[pipeline.cp_sequence_numbers]

[pipeline.tx_balance_changes]

[pipeline.tx_digests]

[pipeline.kv_epoch_ends]

[pipeline.kv_epoch_starts]

[pipeline.kv_feature_flags]

[pipeline.kv_packages]

[pipeline.kv_protocol_configs]

[pipeline.sum_displays]
obj_versions.tomlHeavyweight object versions table containing data since genesis.obj_versions10-14 daysunpruned
Click to open
obj_versions.toml
[ingestion]
ingest-concurrency = 20

[committer]
write-concurrency = 10

[pipeline.obj_versions]
tx_affected_addresses.tomlMidweight transaction table.tx_affected_addresses1-2 days90 days
Click to open
tx_affected_addresses.toml
[ingestion]
ingest-concurrency = 20

[committer]
write-concurrency = 10

[pruner]
retention = 31104000

[pipeline.tx_affected_addresses]
tx_affected_objects.tomlMidweight transaction table.tx_affected_objects1-2 days90 days
Click to open
tx_affected_objects.toml
[committer]
write-concurrency = 20

[pruner]
retention = 31104000

[pipeline.tx_affected_objects]
tx_calls.tomlMidweight transaction table.tx_calls1-2 days90 days
Click to open
tx_calls.toml
[committer]
write-concurrency = 10

[pruner]
retention = 31104000

[pipeline.tx_calls]
tx_kinds.tomlMidweight transaction table.tx_kinds1-2 days90 days
Click to open
tx_kinds.toml
[pruner]
retention = 31104000

[pipeline.tx_kinds]

Consistent store setup​

All consistent store pipelines run in the same instance based on a single configuration file. Like the indexer, the pipelines run in parallel and throughput is limited by the slowest pipeline.

Hardware requirements​

  • CPU: 8 cores
  • Memory: 32GB

Restore command​

Restores one or more pipelines from checkpoint data in a GCS bucket.

$ sui-indexer-alt-consistent-store restore \
--azure <AZURE_BUCKET> \
--database-path <DATABASE_PATH> \
--gcs <GCS_BUCKET> \
--http <HTTP_ENDPOINT> \
--object-file-concurrency <OBJECT_FILE_CONCURRENCY> \
--pipeline <PIPELINE_NAME> \
--remote-store-url <REMOTE_STORE_URL> \
--s3 <S3_BUCKET>
CLI parameterDescription
<AZURE_BUCKET> *Name or URL of Azure bucket containing managed snapshots.
<DATABASE_PATH>Path to RocksDB database.
<GCS_ACCOUNT> *Name or URL of GCS bucket containing managed snapshots.
<HTTP_ENDPOINT> *URL of formal snapshot API.
<OBJECT_FILE_CONCURRENCY>Path to indexer configuration file.
<PIPELINE_NAME>Name of pipeline to restore. Can be set multiple times; once per pipeline.
<REMOTE_STORE_URL>URL of a checkpoint bucket to index from, one of multiple possible data sources.
<S3_BUCKET> *Name or URL of AWS S3 bucket containing managed snapshots.

* Must specify one of <AZURE_BUCKET>, <GCS_ACCOUNT>, <HTTP_ENDPOINT>, or <S3_BUCKET>.

Example:

$ sui-indexer-alt-consistent-store restore \
--database-path /path/to/rocksdb \
--http https://formal-snapshot.mainnet.sui.io \
--object-file-concurrency 5 \
--pipeline balances \
--pipeline object_by_owner \
--pipeline object_by_type \
--remote-store-url https://checkpoints.mainnet.sui.io

Run command​

Run a consistent store instance using this command for the configuration file that follows:

$ sui-indexer-alt-consistent-store run \
--config <CONFIG_FILE> \
--database-path <DATABASE_PATH> \
--remote-store-url <REMOTE_STORE_URL>
CLI paramDescription
<CONFIG_FILE>Path to consistent store configuration file.
<DATABASE_PATH>Path to RocksDB database.
<REMOTE_STORE_URL>URL of a checkpoint bucket to index from, one of multiple possible data sources.

Example:

$ sui-indexer-alt-consistent-store run \
--config consistent-store.toml \
--database-path /path/to/rocksdb \
--remote-store-url https://checkpoints.mainnet.sui.io

Run config recommendations​

Config TOMLDescriptionPipelinesBackfill timeData retention
consistent-store.tomlConsistent store API configuration and event tables.
  • balances
  • object-by-owner
  • object-by-type
1-2 hoursUnpruned
Click to open
consistent-store.toml
β€’
GraphQL and General-Purpose Indexer (Beta)

The GraphQL RPC Beta service offers a structured way for your clients to interact with data on the Sui blockchain. It accesses data processed by a general-purpose indexer and can connect to an archival store for historical network state.

β€’
GraphQL for Sui RPC (Beta)

Use GraphQL to make Sui RPC calls. This feature is currently in Beta.

β€’
Custom Indexing Framework

The sui-indexer-alt-framework is a powerful Rust framework for building high-performance, custom blockchain indexers on Sui. It provides customizable, production-ready components for data ingestion, processing, and storage.

β€’
Indexer Pipeline Architecture

The sui-indexer-alt-framework provides two distinct pipeline architectures. Understand the differences between the sequential and concurrent pipelines that the sui-indexer-alt-framework provides to decide which best suits your project needs.

β€’
Archival Store and Service (Beta)

Overview of the Archival Store and Service to access historical Sui network data.

β€’
Custom Indexer

Establishing a custom indexer helps improve latency, allows pruning the data of your Sui full node, and provides efficient assemblage of checkpoint data.

β€’
Sui Indexer Alt

The sui-indexer-alt crate in the Sui repo.

β€’
Move Registry

The indexer that the Move Registry (MVR) implements.

β€’
DeepBook Indexer

The indexer that DeepBook implements.

β€’
GraphQL Beta schema

Schema documentation for GraphQL Beta