Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MutationOptions

interface MutationOptions <TData = unknown, TError = unknown, TVariables = void, TContext = unknown> {
_defaulted?: boolean;
cacheTime?: number;
meta?: MutationMeta;
mutationFn?: MutationFunction<TData, TVariables>;
mutationKey?: MutationKey;
networkMode?: NetworkMode;
onError?: (
error: TError,
variables: TVariables,
context: TContext | undefined,
) => Promise<unknown> | unknown
;
onMutate?: (variables: TVariables) => Promise<TContext | undefined> | TContext | undefined;
onSettled?: (
data: TData | undefined,
error: TError | null,
variables: TVariables,
context: TContext | undefined,
) => Promise<unknown> | unknown
;
onSuccess?: (
data: TData,
variables: TVariables,
context: TContext | undefined,
) => Promise<unknown> | unknown
;
retry?: RetryValue<TError>;
retryDelay?: RetryDelayValue<TError>;
variables?: TVariables;
}

§Type Parameters

§
TData = unknown
[src]
§
TError = unknown
[src]
§
TVariables = void
[src]
§
TContext = unknown
[src]

§Properties

§
_defaulted?: boolean
[src]
§
cacheTime?: number
[src]
§
mutationFn?: MutationFunction<TData, TVariables>
[src]
§
mutationKey?: MutationKey
[src]
§
networkMode?: NetworkMode
[src]
§
onError?: (error: TError, variables: TVariables, context: TContext | undefined) => Promise<unknown> | unknown
[src]
§
onMutate?: (variables: TVariables) => Promise<TContext | undefined> | TContext | undefined
[src]
§
onSettled?: (data: TData | undefined, error: TError | null, variables: TVariables, context: TContext | undefined) => Promise<unknown> | unknown
[src]
§
onSuccess?: (data: TData, variables: TVariables, context: TContext | undefined) => Promise<unknown> | unknown
[src]
§
retry?: RetryValue<TError>
[src]
§
retryDelay?: RetryDelayValue<TError>
[src]
§
variables?: TVariables
[src]