GraphQL
GraphQL provides a flexible way to query the Sui network. GraphQL RPC is an alternative to the gRPC API.
Which data sources does GraphQL RPC read from?
The GraphQL RPC Service reads data from the General-purpose Indexer's Postgres-compatible database, Archival Store and Service, and a full node.
How does the General-purpose Indexer work?
The General-purpose Indexer is a scalable implementation of the custom indexing framework. The framework ingests data using the remote checkpoint store and full node RPCs. You can configure it to load different types of Sui network data into Postgres tables in parallel, which improves data ingestion performance. You can also configure pruning for different tables to balance performance and cost.
Which GraphQL topic do I need?
The following topics cover GraphQL RPC in more detail:
GraphQL for Sui RPC
Learn the core concepts for working with GraphQL on Sui RPC, including request headers, query composition with variables and fragments, pagination strategies, query scope, service limits, and the components of the GraphQL and General-purpose Indexer stack.
Querying Data with GraphQL RPC
Practical guide to querying the Sui network with GraphQL RPC, with examples for fetching objects, querying transactions and checkpoints, executing and simulating transactions, and using the online IDE with headers, variables, and pagination.
GraphQL Migration Cookbook
Side-by-side JSON-RPC to GraphQL migration examples for transaction lookups, event queries, checkpoint pagination, balance queries, and common data-access patterns.