Skip to main content
Sui Mainnet Global Nodes on Chainstack serve Sui’s GraphQL RPC at /graphql on the same endpoint and auth token as JSON-RPC and gRPC. Use GraphQL for filtered, paginated reads — transactions by address, events by type, objects by owner and type — that have no gRPC equivalent. Each GraphQL request is 1 request unit (RU).

Endpoint and authentication

The GraphQL endpoint is your Sui Mainnet HTTPS endpoint with /graphql appended — YOUR_CHAINSTACK_ENDPOINT/graphql. To find your endpoint on Chainstack, see View node access and credentials. Send each query as an HTTP POST with a JSON body of query and, optionally, variables. GET requests return 404, and the endpoint does not serve a GraphiQL IDE. The endpoint accepts the same credentials as the node’s other interfaces: A request without valid credentials returns 401. Responses carry Access-Control-Allow-Origin: *, so browser apps can call the endpoint directly. For every authentication option, see Authentication methods available on Chainstack. GraphQL is available on Sui Mainnet only. Sui Testnet nodes do not serve /graphql.

Run a query

The official Sui TypeScript SDK (@mysten/sui) includes a GraphQL client, SuiGraphQLClient, that takes the endpoint as its url. The client runs raw queries and also exposes the same client.core methods as the SDK’s gRPC and JSON-RPC clients.
Response:

Filter transactions and events

The transactions and events queries take a filter argument, which is where GraphQL replaces JSON-RPC’s suix_queryTransactionBlocks and suix_queryEvents:
  • transactions — filter by affectedAddress, sentAddress, affectedObject, function, or kind, and bound the range with afterCheckpoint, atCheckpoint, or beforeCheckpoint
  • events — filter by type, module, or sender, with the same checkpoint bounds
This query returns the latest OrderPlaced event from DeepBook v3:
Variables:
Response:
Lists are cursor-paginated. Page forward with first and after, or backward with last and before, and read the cursors from pageInfo. A page holds up to 50 items; requesting more fails with Page size is too large.

How far back GraphQL history goes

GraphQL history depends on the query type. Each kind of query reads from its own window, and the node reports every window through serviceConfig.availableRange: Query availableRange for the current window of a specific query and filter. first is the oldest checkpoint the query can reach:
A query outside its window returns an empty result, not an error. A filtered list returns no nodes, a transaction lookup returns null, and a checkpoint below the floor returns its sequenceNumber with every other field null. Check availableRange before you read an empty result as “no data”. The windows move — the filtered window rolls forward with every checkpoint — so read availableRange at runtime instead of hard-coding checkpoint numbers. The gRPC interface on the same node reports the matching floor as lowestAvailableCheckpoint — see Checkpoint retention. For data older than these windows, query an archival service — see Sui’s Archival Store and Service.

Query limits

The node reports its query limits through serviceConfig. A query over a limit fails with a GRAPHQL_VALIDATION_FAILED error that names the limit.
To see how close a query comes to these limits, send it with the x-sui-rpc-show-usage: true header. The response then carries an extensions.usage object with the query’s node count, depth, and payload size in bytes.

Transactions and simulation

GraphQL also covers writes. The executeTransaction mutation submits a signed transaction, and the simulateTransaction query dry-runs one, replacing JSON-RPC’s sui_dryRunTransactionBlock and sui_devInspectTransactionBlock. With the TypeScript SDK, call client.simulateTransaction() and client.signAndExecuteTransaction() on a SuiGraphQLClient the same way as on the gRPC client.

Streaming

The GraphQL endpoint does not accept WebSocket connections, so GraphQL subscriptions are not available. To stream new checkpoints, use gRPC SubscriptionService/SubscribeCheckpoints on the same node — see Sui tooling.

Billing

Each GraphQL request is 1 RU, the same as a gRPC or JSON-RPC call on Sui. Sui has no archive billing split, so a query that reaches back to the window floor costs the same as one at the tip. See Request units.

Next steps

Last modified on September 29, 2026