Name / Type |
Description |
---|---|
Operation options |
|
|
A GraphQL query string parsed into an AST with the Optional for the Required for the |
|
An object containing all of the GraphQL variables your mutation requires to execute. Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value. |
|
Specifies how the mutation handles a response that returns both GraphQL errors and partial results. For details, see GraphQL error policies. The default value is |
|
A callback function that's called when your mutation successfully completes with zero errors (or if This function is passed the mutation's result |
|
A callback function that's called when the mutation encounters one or more errors (unless This function is passed an |
|
Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the Returning a |
|
An array (or a function that returns an array) that specifies which queries you want to refetch after the mutation occurs. Each array value can be either:
|
|
If The default value is |
|
If The default value is |
Networking options |
|
|
If The default value is |
|
The instance of By default, the instance that's passed down via context is used, but you can provide a different instance here. |
|
If you're using Apollo Link, this object is the initial value of the |
Caching options |
|
|
A function used to update the Apollo Client cache after the mutation completes. For more information, see Updating the cache after a mutation. |
|
If provided, Apollo Client caches this temporary (and potentially incorrect) response until the mutation completes, enabling more responsive UI updates. For more information, see Optimistic mutation results. |