MutationRegistration<TData, TVariables> class final

A mutation registered under a key with MutationRegistry.register.

Everything a registered call needs must be reachable from here or from its variables: a queued call may outlive the widget that made it.

Annotations
  • @immutable

Constructors

MutationRegistration({required String key, required RegisteredMutator<TData, TVariables> mutator, required QoraSerializer<TVariables> variables, List<Object>? invalidates, List<QueryTag>? invalidatesTags, String? scope(TVariables variables)?, bool isPermanent(Object error)?})
Creates a registration. Prefer MutationRegistry.register or QoraClient.registerMutation, which build it for you.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
invalidates → List<Object>?
Query keys invalidated after every successful call, in addition to the call site's MutationOptions.invalidates.
final
invalidatesTags → List<QueryTag>?
Tags invalidated after every successful call, in addition to the call site's MutationOptions.invalidatesTags.
final
isPermanent → bool Function(Object error)?
Whether an error rejects a queued call for good, instead of being retried. Overrides MutationQueueConfig.isPermanent. When neither is set, every error is transient.
final
key → String
The key call sites name in MutationOptions.mutationKey.
final
mutator → RegisteredMutator<TData, TVariables>
Runs the write. Used for every call made with key, in the session that made it and on any later replay.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String? Function(TVariables variables)?
Returns the scope of a queued call, or null for the global lane.
final
variables → QoraSerializer<TVariables>
Converts the variables to and from JSON, so a queued call can be stored.
final
variablesType → Type
The variables type this mutation was registered with.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(TVariables variables, MutationMeta meta) → Future<TData>
Runs mutator with the given identity.
toString() → String
A string representation of this object.
inherited

Operators

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