1.1 KiB
1.1 KiB
ApolloMutation component
Props
mutation: GraphQL query (transformed bygraphql-tag)variables: Object of GraphQL variablesoptimisticResponse: See optimistic UIupdate: See updating cache after mutationrefetchQueries: See refetching queries after mutationclientId: Used to resolve the Apollo Client used (defined in ApolloProvider)tag: String HTML tag name (default:div); ifundefined, the component will be renderless (the content won't be wrapped in a tag)
Scoped slot props
mutate(options = undefined): Function to call the mutation. You can override the mutation options (for example:mutate({ variables: { foo: 'bar } }))loading: Boolean indicating that the request is in flighterror: Eventual error for the last mutation callgqlError: first GraphQL error if any
Events
done(resultObject)error(errorObject)