onSettled property

OnMutationSettled<TData, TVariables, TOnMutateResult>? onSettled
final

Runs after onSuccess or onError and the cache-wide MutationCache.onSettled, with whichever of data and error applies. A returned future is awaited, and the mutation stays pending until it completes — return an invalidation's future to report success only once the refetch is done. No default.

Implementation

final OnMutationSettled<TData, TVariables, TOnMutateResult>? onSettled;