Skip to content

Commit

Permalink
Update refetchQueries with string options (#5641)
Browse files Browse the repository at this point in the history
* Update refetchQueries with string options

`refetchQueries?: Array<string | PureQueryOptions> | RefetchQueriesFunction;`

* Fixing refetchQueries docs

* Changelog updates
  • Loading branch information
Sequoia authored and hwillson committed Dec 13, 2019
1 parent 4fb237d commit 59b66f1
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 @@ -16,7 +16,8 @@
[@mjlyons](https://github.com/mjlyons) in [#5388](https://github.com/apollographql/apollo-client/pull/5388)

- Documentation updates. <br/>
[@tomquirk](https://github.com/tomquirk) in [#5645](https://github.com/apollographql/apollo-client/pull/5645)
[@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)

### 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 |
| `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. |
| `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 59b66f1

Please sign in to comment.