type UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
}> & object;Defined in: packages/preact-query/src/types.ts:452
The result of useMutation. Same as MutationObserverResult from @tanstack/query-core, with mutate narrowed to the fire-and-forget UseMutateFunction signature, plus the added mutateAsync.
mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;Similar to mutate, but returns a promise which can be awaited.
TData = unknown
The type your mutation function resolves to.
TError = DefaultError
The type of errors your mutation function may throw.
TVariables = unknown
The type of the variable passed to mutate/mutateAsync.
TOnMutateResult = unknown
The type returned by onMutate, passed to onSuccess/onError/onSettled as their onMutateResult parameter — useful for optimistic-update rollback data.