Builders can query Sui data and keep receiving matching checkpoints, transactions, and events through the same GraphQL interface.

Main Takeaways

  • GraphQL on Sui now delivers checkpoints, transactions, and events as they happen, with filtering aligned to what's already available for queries.
  • A subscription can start from a cursor in the past, backfill to the present, and continue into live delivery. Clients that disconnect reconnect and backfill from where they left off.
  • Sui provides real-time data through both gRPC and GraphQL. Builders pick the interface that fits their stack.

Agents and applications do more than look up blockchain data. They react as transactions happen: a wallet shows a payment, a trading application updates a position, a monitoring service flags unusual activity.

Until now, developers using GraphQL on Sui could query that data but had to keep asking whether it had changed. With GraphQL Subscriptions, an application describes the activity it cares about and receives matching updates as they occur.

Developers can subscribe to checkpoints, transactions, and events. Transaction and event subscriptions use filtering aligned with GraphQL queries, so an application can find historical data and follow new activity through one interface. The fields available through the Query schema are available in subscriptions as well, with limited exceptions.

Query, catch up, stay current

Suppose an application needs to follow events from a particular package. It queries the events it needs, then keeps receiving matching events as new ones occur.

A subscription does not have to start from now. It can start from a cursor in the past, replay matching transactions or events to the present, and continue into live delivery as one continuous, ordered stream. If a client disconnects, it reconnects with its last-seen cursor and the subscription backfills what it missed before resuming live. The service recovers its own gaps too: if its upstream checkpoint connection is interrupted, it recovers the missed checkpoints so subscribers see a contiguous feed.

That continuity applies across wallets, explorers, trading applications, analytics tools, monitoring systems, automation services, and AI agents, anything that reacts to onchain activity without polling for it.

‍

GraphQL Subscriptions and gRPC subscriptions

Sui already provides real-time subscriptions through gRPC. Both interfaces now deliver filtered, live streams of Sui activity, and are built to serve different needs.

gRPC is Sui's lower-level, strongly typed interface. It's the natural choice for high-performance backends, exchanges, infrastructure, and large indexing systems. GraphQL Subscriptions expose that same activity through GraphQL, so developers can select the fields and related data their application needs using the types and filters they already use for queries.

Lighter-weight custom indexing

GraphQL Subscriptions give teams working in TypeScript, Python, and other widely used programming languages a simpler path to application-specific indexing. A developer can subscribe to the transactions or events relevant to their application and write those results into their own database or pipeline. A team tracking activity from its own contracts now doesn't necessarily need to adopt the Rust-based custom indexing framework to keep a live view of that data.

This doesn't replace the custom indexing framework though. That framework remains the right option for purpose-built pipelines with their own storage and processing logic, and more sophisticated indexing workloads still benefit from it.

How the pieces fit

GraphQL Subscriptions aren't a parallel data stack. For live data, the GraphQL service consumes Sui's gRPC checkpoint stream. For historical catch-up and data resolution, it uses the gRPC Ledger Service, which can point at an archival instance when full history is required.

Sui → gRPC + Archival → GraphQL → application

GraphQL Subscriptions are available on both Testnet and Mainnet. Explore the GraphQL Subscriptions documentation to get started.

‍

Author

Sui Foundation

High-performance blockchain delivering the full stack for a new global economy.

Read more like this

Greater Ecosystem Security Through Audits and Move Registry

Explore how audit firms and onchain transparency via Move Registry strengthen smart contract security in the Sui ecosystem.

2min read
Sam Blackshear

Hub71 Introduces Sui to the UAE

Hub71's new Sui incubator brings Web3 projects to the United Arab Emirates.

2min read
Sui Foundation

Agora to Offer AUSD Stablecoin on Sui

The proliferation of stablecoins such as AUSD on Sui give DeFi users new options to store value.

1min read
Sui Foundation

All About Storage Fees

Sui's storage fee model ensures Validators can maintain their infrastructure and establishes a fund to enhance network stability.

2min read
Sam Blackshear

Meet the Third Cohort of the Sui Hydropower Fellowship

Six teams building on Sui across agentic finance, RWA infrastructure, consumer social, and more

2min read
Sui Foundation

Announcing APAC Office Hours for Builders

Builders ready to take the next step with their business are invited to Office Hours with Sui Foundation's Growth team.

2min read
Sui Foundation