Skip to content

Commit 7d4c4fd

Browse files
author
Guillaume Chau
committed
docs: more info on mutation component + toc update
1 parent 3d582f3 commit 7d4c4fd

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ Integrates [apollo](https://www.apollographql.com/) in your [Vue](http://vuejs.o
4848
- [Special options](#special-options)
4949
- [Skip all](#skip-all)
5050
- [Multiple clients](#multiple-clients)
51-
- [Query Components](#query-components)
51+
- [Components](#components)
52+
- [Query Components](#query-components)
53+
- [Mutation Components](#mutation-components)
5254
- [Server-Side Rendering](#server-side-rendering)
5355
- [Migration](#migration)
5456
- [API Reference](#api-reference)
@@ -1314,18 +1316,18 @@ export default {
13141316

13151317
Props:
13161318

1317-
- `mutation`
1318-
- `variables`
1319-
- `optimisticResponse`
1320-
- `update`
1321-
- `refetchQueries`
1322-
- `tag`
1319+
- `mutation`: GraphQL query (transformed by `graphql-tag`)
1320+
- `variables`: Object of GraphQL variables
1321+
- `optimisticResponse`: See [optimistic UI](https://www.apollographql.com/docs/react/features/optimistic-ui.html)
1322+
- `update`: See [updating cache after mutation](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-update)
1323+
- `refetchQueries`: See [refetching queries after mutation](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-mutation-options-refetchQueries)
1324+
- `tag`: String HTML tag name (default: `div`)
13231325

13241326
Scoped slot props:
13251327

1326-
- `mutate`
1327-
- `loading`
1328-
- `error`
1328+
- `mutate(options = undefined)`: Function to call the mutation. You can override the mutation options (for example: `mutate({ variables: { foo: 'bar } })`)
1329+
- `loading`: Boolean indicating that the request is in flight
1330+
- `error`: Eventual error for the last mutation call
13291331

13301332
Events:
13311333

0 commit comments

Comments
 (0)