onMutationError method

  1. @override
void onMutationError(
  1. Mutation mutation,
  2. StackTrace stackTrace
)
override

Called if a mutation error happens.

Implementation

@override
void onMutationError(
  Mutation<dynamic, dynamic> mutation,
  StackTrace stackTrace,
) {
  if (!mutationError) return;
  _log(
    _AnsiColors("[MUTATION ERROR]", colors: colors).bold.red.toString(),
    message: 'Error: ${mutation.state.error}',
    key: mutation.key,
    stackTrace: stackTrace,
  );
}