MutationOptions<TParsed extends Object?> class

Annotations
  • @immutable

Constructors

MutationOptions({required DocumentNode document, String? operationName, Map<String, dynamic> variables = const {}, FetchPolicy? fetchPolicy, ErrorPolicy? errorPolicy, CacheRereadPolicy? cacheRereadPolicy, Context? context, Object? optimisticResult, OnMutationCompleted? onCompleted, OnMutationUpdate<TParsed>? update, OnError? onError, List<QueryOptions<Object?>>? refetchQueries, bool? awaitRefetchQueries, ResultParserFn<TParsed>? parserFn, Duration? queryRequestTimeout, CancellationToken? cancellationToken})

Properties

asRequest → Request
Resolve these options into a request
no setterinherited
awaitRefetchQueries → bool?
Whether to wait for all refetchQueries futures to resolve before the mutation result is returned.
final
cacheRereadPolicy → CacheRereadPolicy?
no setterinherited
cancellationToken → CancellationToken?
Token that can be used to cancel the operation.
finalinherited
context → Context
Context to be passed to link execution chain.
finalinherited
document → DocumentNode
Document containing at least one OperationDefinitionNode
finalinherited
errorPolicy → ErrorPolicy?
no setterinherited
fetchPolicy → FetchPolicy?
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isMutation → bool
no setterinherited
isQuery → bool
no setterinherited
isSubscription → bool
no setterinherited
onCompleted → OnMutationCompleted?
final
onError → OnError?
final
operationName → String?
Name of the executable definition
finalinherited
optimisticResult → Object?
An optimistic result to eagerly add to the operation stream
finalinherited
parserFn → ResultParserFn<TParsed>
finalinherited
policies → Policies
Specifies the Policies to be used during execution.
finalinherited
properties → List<Object?>
no setter
queryRequestTimeout → Duration?
Override default query timeout
finalinherited
refetchQueries → List<QueryOptions<Object?>>?
Queries to refetch on the network once this mutation settles without exceptions.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → OperationType
no setterinherited
update → OnMutationUpdate<TParsed>?
final
variables → Map<String, dynamic>
A map going from variable name to variable value, where the variables are used within the GraphQL query.
finalinherited

Methods

asWatchQueryOptions() → WatchQueryOptions<TParsed>
copyWith({DocumentNode? document, String? operationName, Map<String, dynamic>? variables, FetchPolicy? fetchPolicy, ErrorPolicy? errorPolicy, CacheRereadPolicy? cacheRereadPolicy, Context? context, Object? optimisticResult, OnMutationCompleted? onCompleted, OnMutationUpdate<TParsed>? update, OnError? onError, List<QueryOptions<Object?>>? refetchQueries, bool? awaitRefetchQueries, ResultParserFn<TParsed>? parserFn, Duration? queryRequestTimeout, CancellationToken? cancellationToken}) → MutationOptions<TParsed>
Generic copyWith for all fields. There is also a more specific option:
copyWithPolicies(Policies policies) → MutationOptions<TParsed>
createResult({Map<String, dynamic>? data, OperationException? exception, Context context = const Context(), required QueryResultSource source}) → QueryResult<TParsed>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
properties based deep equality check
inherited