createMutation

Function: createMutation()

ts
function createMutation<TData, TError, TVariables, TContext>(
  options,
  queryClient?,
): CreateMutationResult<TData, TError, TVariables, TContext>
function createMutation<TData, TError, TVariables, TContext>(
  options,
  queryClient?,
): CreateMutationResult<TData, TError, TVariables, TContext>

Type Parameters

TData = unknown

TError = Error

TVariables = void

TContext = unknown

Parameters

options: StoreOrVal<CreateMutationOptions<TData, TError, TVariables, TContext>>

queryClient?: QueryClient

Returns

CreateMutationResult<TData, TError, TVariables, TContext>

Defined in

packages/svelte-query/src/createMutation.ts:13