ShortcakeApi class

Constructors

ShortcakeApi(String uri)

Properties

cache → GraphQLCache
The initial Cache to use in the data store.
finalinherited
defaultPolicies ↔ DefaultPolicies
The default Policies to set for each client action
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
The Link over which GraphQL documents will be resolved into a Response.
finalinherited
queryManager ↔ QueryManager
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri String
final

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 to FetchMoreOptions.updateQuery.
inherited
introspect() Future<QueryResult<Object?>>
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 the QueryResult or throws an Exception.
inherited
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 the QueryResult or throws an Exception.
inherited
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 unless refetchQueries is disabled
inherited
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 an ObservableQuery based on the provided WatchQueryOptions.
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