MutationOptions<TData, TVariables, TOptimistic> class final

Strongly typed definition for one mutation kind.

Constructors

MutationOptions({required MutationFunction<TData, TVariables> mutation, QueryKey<Object?>? key, String? scope, QueryRetry retry = const QueryRetry.never(), Duration retryDelay(int failureCount, Object error) = defaultQueryRetryDelay, QueryNetworkMode networkMode = QueryNetworkMode.online, Duration gcTime = const Duration(minutes: 5), Map<String, Object?> meta = const <String, Object?>{}, MutationOnMutate<TVariables, TOptimistic>? onMutate, MutationOnSuccess<TData, TVariables, TOptimistic>? onSuccess, MutationOnError<TVariables, TOptimistic>? onError, MutationOnSettled<TData, TVariables, TOptimistic>? onSettled})
Creates a typed mutation definition.
const

Properties

gcTime → Duration
How long an unused mutation remains cached.
final
hashCode → int
The hash code for this object.
no setterinherited
key → QueryKey<Object?>?
The optional key used for defaults and filtering.
final
meta → Map<String, Object?>
User metadata exposed to callbacks.
final
mutation → MutationFunction<TData, TVariables>
The operation executed for each mutation.
final
networkMode → QueryNetworkMode
Controls execution while offline.
final
onError → MutationOnError<TVariables, TOptimistic>?
Callback invoked after failure.
final
onMutate → MutationOnMutate<TVariables, TOptimistic>?
Callback invoked before execution.
final
onSettled → MutationOnSettled<TData, TVariables, TOptimistic>?
Callback invoked after either outcome.
final
onSuccess → MutationOnSuccess<TData, TVariables, TOptimistic>?
Callback invoked after success.
final
retry → QueryRetry
The retry policy for failed executions.
final
retryDelay → Duration Function(int failureCount, Object error)
Computes the delay before a retry.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String?
Mutations in the same non-null scope execute serially.
final

Methods

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
The equality operator.
inherited