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.
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.
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 param | Description |
|---|---|
<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 TOML | Description | Pipelines | Backfill time | Data retention |
|---|---|---|---|---|
events.toml | Lightweight event tables. |
| 1-2 days | 90 days |
Click to open
| ||||
misc.toml | Lightweight miscellaneous tables. |
| 2-4 days | 90 days |
Click to open
| ||||
obj_versions.toml | Heavyweight object versions table containing data since genesis. | obj_versions | 10-14 days | unpruned |
Click to open
| ||||
tx_affected_addresses.toml | Midweight transaction table. | tx_affected_addresses | 1-2 days | 90 days |
Click to open
| ||||
tx_affected_objects.toml | Midweight transaction table. | tx_affected_objects | 1-2 days | 90 days |
Click to open
| ||||
tx_calls.toml | Midweight transaction table. | tx_calls | 1-2 days | 90 days |
Click to open
| ||||
tx_kinds.toml | Midweight transaction table. | tx_kinds | 1-2 days | 90 days |
Click to open
| ||||
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 parameter | Description |
|---|---|
<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 param | Description |
|---|---|
<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 TOML | Description | Pipelines | Backfill time | Data retention |
|---|---|---|---|---|
consistent-store.toml | Consistent store API configuration and event tables. |
| 1-2 hours | Unpruned |
consistent-store.toml
examples/prod-config/consistent-store.toml. You probably need to run `pnpm prebuild` and restart the site.Related linksβ
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.
Use GraphQL to make Sui RPC calls. This feature is currently in Beta.
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.
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.
Overview of the Archival Store and Service to access historical Sui network data.
Establishing a custom indexer helps improve latency, allows pruning the data of your Sui full node, and provides efficient assemblage of checkpoint data.
The sui-indexer-alt crate in the Sui repo.
The indexer that the Move Registry (MVR) implements.
The indexer that DeepBook implements.
Schema documentation for GraphQL Beta