Skip to main content

Sui GraphQL RPC

GraphQL RPC is the recommended query interface for frontends, analytics, and flexible historical exploration. Sui documents this surface in the GraphQL RPC guide.

When to choose GraphQL

WorkloadWhy GraphQL fits
Frontend object or address viewsA client can request only fields needed for the page.
Analytics and explorationCursor pagination and nested selections reduce follow-up requests.
Historical transaction lookupQuery shape is easier to evolve than fixed JSON-RPC method responses.
Public read APIHTTP gateways can cache, rate-limit, and inspect request cost.
warning

GraphQL is easier to expose publicly than gRPC, but it still needs request-size limits, query-depth limits, pagination caps, and abuse monitoring. Use /developer/rate-limiting and /operations/observability for shared controls.

See GraphQL samples and query files under chains/sui/samples/graphql/.