OnMutationError<TVariables, TOnMutateResult> typedef Mutations

OnMutationError<TVariables, TOnMutateResult> = FutureOr<void> Function(Object error, StackTrace stackTrace, TVariables variables, TOnMutateResult? onMutateResult)

The signature of MutationOptions.onError and MutateCallbacks.onError: the error and where it was thrown, the variables, and what onMutate returned (null when onMutate itself threw or there is none).

Implementation

typedef OnMutationError<TVariables, TOnMutateResult> = FutureOr<void> Function(
  Object error,
  StackTrace stackTrace,
  TVariables variables,
  TOnMutateResult? onMutateResult,
);