QueryManager class

Constructors

QueryManager({required Link link, required GraphQLCache cache, bool alwaysRebroadcast = false})

Properties

alwaysRebroadcast bool
Whether to skip deep equality checks in maybeRebroadcastQueries
final
cache GraphQLCache
final
hashCode int
The hash code for this object.
no setterinherited
idCounter int
getter/setter pair
final
queries Map<String, ObservableQuery<Object?>>
ObservableQuery registry
getter/setter pair
rebroadcastLocked bool
prevents rebroadcasting for some intensive bulk operation like refetchSafeQueries
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduler ↔ QueryScheduler?
getter/setter pair

Methods

addQueryResult<TParsed>(Request request, String? queryId, QueryResult<TParsed> queryResult) → void
Add a result to the ObservableQuery specified by queryId, if it exists.
closeQuery(ObservableQuery<Object?> observableQuery, {bool fromQuery = false}) → void
fetchQuery<TParsed>(String queryId, BaseOptions<TParsed> options) Future<QueryResult<TParsed>>
fetchQueryAsMultiSourceResult<TParsed>(String queryId, BaseOptions<TParsed> options) MultiSourceResult<TParsed>
Wrap both the eagerResult and networkResult future in a MultiSourceResult if the cache policy precludes a network request, networkResult will be null
generateQueryId() int
getQuery<TParsed>(String? queryId) ObservableQuery<TParsed>?
maybeRebroadcastQueries({ObservableQuery<Object?>? exclude, bool force = false}) bool
Rebroadcast cached queries with changed underlying data if cache.broadcastRequested or force.
mutate<TParsed>(MutationOptions<TParsed> options) Future<QueryResult<TParsed>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query<TParsed>(QueryOptions<TParsed> options) Future<QueryResult<TParsed>>
refetchQuery<TParsed>(String queryId) Future<QueryResult<TParsed>?>
Refetch the ObservableQuery referenced by queryId, overriding any present non-network-only FetchPolicy.
refetchSafeQueries() Future<List<QueryResult<Object?>?>>
setQuery(ObservableQuery<Object?> observableQuery) → void
subscribe<TParsed>(SubscriptionOptions<TParsed> options) Stream<QueryResult<TParsed>>
toString() String
A string representation of this object.
inherited
watchQuery<TParsed>(WatchQueryOptions<TParsed> options) ObservableQuery<TParsed>

Operators

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