Skip to content

Commit

Permalink
[Docs] correctly describe what refetchQueries does (#5628)
Browse files Browse the repository at this point in the history
* [Docs] correctly describe what `refetchQueries` does

* Changelog update
  • Loading branch information
phryneas authored and hwillson committed Dec 13, 2019
1 parent 59b66f1 commit 00e0eec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

- Documentation updates. <br/>
[@tomquirk](https://github.com/tomquirk) in [#5645](https://github.com/apollographql/apollo-client/pull/5645) <br/>
[@Sequoia](https://github.com/Sequoia) in [#5641](https://github.com/apollographql/apollo-client/pull/5641)
[@Sequoia](https://github.com/Sequoia) in [#5641](https://github.com/apollographql/apollo-client/pull/5641) <br/>
[@phryneas](https://github.com/phryneas) in [#5628](https://github.com/apollographql/apollo-client/pull/5628)

### GraphQL Anywhere vNext

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/mutation-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| `update` | (cache: DataProxy, mutationResult: FetchResult) | A function used to update the cache after a mutation occurs |
| `ignoreResults`| boolean | If true, the returned `data` property will not update with the mutation result. |
| `optimisticResponse` | Object | Provide a [mutation response](/features/optimistic-ui/) before the result comes back from the server |
| `refetchQueries`| (mutationResult: FetchResult) => Array&lt;{ query: DocumentNode, variables?: TVariables}&gt; | A function that allows you to specify which queries you want to refetch after a mutation has occurred, or an array of strings matching the **names** of queries to be refetched. |
| `refetchQueries` | Array&lt;string\|{ query: DocumentNode, variables?: TVariables}&gt; \| ((mutationResult: FetchResult) => Array&lt;string\|{ query: DocumentNode, variables?: TVariables}&gt;) | An array or function that allows you to specify which queries you want to refetch after a mutation has occurred. Array values can either be queries (with optional variables) or just the string names of queries to be refeteched. |
| `awaitRefetchQueries` | boolean | Queries refetched as part of `refetchQueries` are handled asynchronously, and are not waited on before the mutation is completed (resolved). Setting this to `true` will make sure refetched queries are completed before the mutation is considered done. `false` by default. |
| `onCompleted` | (data: TData) => void | A callback executed once your mutation successfully completes |
| `onError` | (error: ApolloError) => void | A callback executed in the event of an error. |
Expand Down

0 comments on commit 00e0eec

Please sign in to comment.