ApolloMutation ​
Props ​
| Name | Type | Default | Description |
|---|---|---|---|
mutation (required) | TypedDocumentNode<TData, TVariables> | Â | The mutation document. |
variables | TVariables | undefined | Â | Variables applied to every call, unless overridden in mutate(). |
clientId | string | undefined | Â | Name of the client to use, from the provided ApolloClients map. |
options | useMutation.Options<TData, TVariables> | undefined | Â | Escape hatch for any other useMutation option. |
Events ​
| Name | Payload |
|---|---|
error | [error: ErrorLike] |
done | [result: ApolloClient.MutateResult<MaybeMasked<TData>>] |
Slots ​
#default ​
| Slot prop | Type |
|---|---|
mutate | useMutation.MutateFunction<TData, TVariables> |
loading | boolean |
error | ErrorLike | undefined |
called | boolean |
result | TData | null | undefined |
reset | () => void |
Exposed ​
A template ref receives the full useMutation.Result surface, with refs unwrapped.
vue
<template>
<ApolloMutation ref="apollo" ... />
</template>