Files
apollo/docs/api/apollo-mutation.md
T
Alexandru Savin 50cbdac572 docs: Remove redundant word in docs (#486)
* Remove redundant word in docs

* Update apollo-mutation.md
2019-01-10 15:05:31 +01:00

1.2 KiB

ApolloMutation component

Props

  • mutation: GraphQL query (transformed by graphql-tag)
  • variables: Object of GraphQL variables
  • optimisticResponse: See optimistic UI
  • update: See updating cache after mutation
  • refetchQueries: See refetching queries after mutation
  • clientId: id of the Apollo Client used by the query (defined in ApolloProvider clients option)
  • tag: String HTML tag name (default: div); if undefined, 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 flight
  • error: Eventual error for the last mutation call
  • gqlError: first GraphQL error if any

Events

  • done(resultObject)
  • error(errorObject)