Hybrids: Mutation Factory
Exports
import { mutation } from '@apollo-elements/hybrids/factories/mutation';
mutation
Hybrids property descriptor factory for GraphQL Mutations. Implements the ApolloMutationElement interface.
Parameters
document
DocumentNode | TypedDocumentNode
The mutation document.
options
MutationHybridsFactoryOptions<D, V>
Options to configure the mutation.
Option | Type | Description |
---|---|---|
client |
|
ApolloClient instance use to make the call. |
mutation |
|
A specific mutation document. See mutation . |
variables |
|
Operation variables. See variables . |
optimisticResponse | See optimisticResponse in ApolloMutationInterface | |
context |
|
Context object passed through the link execution chain. |
errorPolicy |
|
Error policy to use for the mutation. See errorPolicy |
fetchPolicy |
|
See fetchPolicy |
refetchQueries | See refetchQueries |
|
awaitRefetchQueries |
|
See awaitRefetchQueries |
updater | See updater |
Function used to update the client cache following the mutation. |
Returns
Descriptor<ApolloMutationElement<D, V>>
Hybrids descriptor which mixes the ApolloMutationInterface in on connect