AdeptGraphQLClient class
A GraphQLClient abstraction to allow timeouts
Constructors
- AdeptGraphQLClient({required Link link, required GraphQLCache cache, DefaultPolicies? defaultPolicies, bool alwaysRebroadcast = false, Duration? timeout})
Properties
- cache → GraphQLCache
-
The initial
Cache
to use in the data store.finalinherited - defaultPolicies ↔ DefaultPolicies
-
The default
Policies
to set for each client actionlatefinalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- link → Link
-
The
Link
over which GraphQL documents will be resolved into aResponse
.finalinherited - queryManager ↔ QueryManager
-
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout ↔ Duration?
-
getter/setter pair
Methods
-
copyWith(
{Link? link, GraphQLCache? cache, DefaultPolicies? defaultPolicies, bool? alwaysRebroadcast}) → GraphQLClient -
Create a copy of the client with the provided information.
inherited
-
fetchMore<
TParsed> (FetchMoreOptions fetchMoreOptions, {required QueryOptions< TParsed> originalOptions, required QueryResult<TParsed> previousResult}) → Future<QueryResult< TParsed> > -
Fetch more results and then merge them with the given
previousResult
according toFetchMoreOptions.updateQuery
.inherited -
mutate<
TParsed> (MutationOptions< TParsed> options) → Future<QueryResult< TParsed> > -
This resolves a single mutation according to the
MutationOptions
specified and returns a Future which resolves with theQueryResult
or throws an Exception. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query<
TParsed> (QueryOptions< TParsed> options) → Future<QueryResult< TParsed> > -
This resolves a single query according to the
QueryOptions
specified and returns a Future which resolves with theQueryResult
or throws an Exception. -
readFragment(
FragmentRequest fragmentRequest, {bool optimistic = true}) → Map< String, dynamic> ? -
pass through to
cache.readFragment
inherited -
readQuery(
Request request, {bool optimistic = true}) → Map< String, dynamic> ? -
pass through to
cache.readQuery
inherited -
resetStore(
{bool refetchQueries = true}) → Future< List< ?QueryResult< >Object?> ?> -
Resets the contents of the store with
cache.store.reset()
and then refetches of all queries unlessrefetchQueries
is disabledinherited -
subscribe<
TParsed> (SubscriptionOptions< TParsed> options) → Stream<QueryResult< TParsed> > -
This subscribes to a GraphQL subscription according to the options specified and returns a
Stream which either emits received data or an error.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watchMutation<
TParsed> (WatchQueryOptions< TParsed> options) → ObservableQuery<TParsed> -
watchMutation is the same as watchQuery, but with a different defaultPolicies that are more appropriate for mutations.
inherited
-
watchQuery<
TParsed> (WatchQueryOptions< TParsed> options) → ObservableQuery<TParsed> -
This registers a query in the
QueryManager
and returns anObservableQuery
based on the providedWatchQueryOptions
.inherited -
writeFragment(
FragmentRequest fragmentRequest, {bool? broadcast = true, required Map< String, dynamic> data}) → void -
pass through to
cache.writeFragment
and then rebroadcast any changes.inherited -
writeQuery(
Request request, {required Map< String, dynamic> data, bool? broadcast = true}) → void -
pass through to
cache.writeQuery
and then rebroadcast any changes.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited