Skip to content

ApolloMutation ​

Props ​

NameTypeDefaultDescription
mutation (required)TypedDocumentNode<TData, TVariables> The mutation document.
variablesTVariables | undefined Variables applied to every call, unless overridden in mutate().
clientIdstring | undefined Name of the client to use, from the provided ApolloClients map.
optionsuseMutation.Options<TData, TVariables> | undefined Escape hatch for any other useMutation option.

Events ​

NamePayload
error[error: ErrorLike]
done[result: ApolloClient.MutateResult<MaybeMasked<TData>>]

Slots ​

#default ​

Slot propType
mutateuseMutation.MutateFunction<TData, TVariables>
loadingboolean
errorErrorLike | undefined
calledboolean
resultTData | null | undefined
reset() => void

Exposed ​

A template ref receives the full useMutation.Result surface, with refs unwrapped.

vue
<template>
  <ApolloMutation ref="apollo" ... />
</template>

Released under the MIT License.