GraphQLClient class

The link is a Link over which GraphQL documents will be resolved into a FetchResult. The cache is the initial Cache to use in the data store.

Constructors

GraphQLClient({@required Link link, @required Cache cache })
Constructs a GraphQLClient given a Link and a Cache.

Properties

cache Cache
The initial Cache to use in the data store.
final
The Link over which GraphQL documents will be resolved into a FetchResult.
final
queryManager QueryManager
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

mutate(MutationOptions options) → Future<QueryResult>
This resolves a single mutation according to the MutationOptions specified and returns a Future which resolves with the QueryResult or throws an Exception.
query(QueryOptions options) → Future<QueryResult>
This resolves a single query according to the QueryOptions specified and returns a Future which resolves with the QueryResult or throws an Exception.
subscribe(Operation operation) → Stream<FetchResult>
This subscribes to a GraphQL subscription according to the options specified and returns a Stream which either emits received data or an error.
watchQuery(WatchQueryOptions options) ObservableQuery
This registers a query in the QueryManager and returns an ObservableQuery based on the provided WatchQueryOptions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited