GraphQLTransport class

Minimal GraphQL-over-HTTP transport for Sui GraphQL RPC.

GraphQL RPC is served by an indexer, not by full nodes (so it is NOT on the fullnode.*.sui.io hosts). Mysten operates public endpoints at graphql.<network>.sui.io/graphql; see graphqlEndpoint. You can also point endpoint at a provider (QuickNode / Ankr / BlockPi / ZAN) or a self-hosted indexer.

This transport complements the gRPC-web transport, which covers the core read/write path. GraphQL is intended for query patterns full nodes cannot serve (filtered transaction/event queries, staking, validator APYs).

Constructors

GraphQLTransport(String endpoint, {Dio? dio, Map<String, String> headers = const {}})

Properties

endpoint String
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String query, {Map<String, dynamic>? variables}) Future<Map<String, dynamic>>
Execute a GraphQL query with optional variables; returns the data object. Throws GraphQLException if the response carries errors.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited