diff --git a/CHANGELOG.md b/CHANGELOG.md index b681e8353e2..61f69cf0c96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,8 @@ - Documentation updates.
[@tomquirk](https://github.com/tomquirk) in [#5645](https://github.com/apollographql/apollo-client/pull/5645)
- [@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)
+ [@phryneas](https://github.com/phryneas) in [#5628](https://github.com/apollographql/apollo-client/pull/5628) ### GraphQL Anywhere vNext diff --git a/docs/shared/mutation-options.mdx b/docs/shared/mutation-options.mdx index 55f36411f94..577b549f3d5 100644 --- a/docs/shared/mutation-options.mdx +++ b/docs/shared/mutation-options.mdx @@ -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<{ query: DocumentNode, variables?: TVariables}> | 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<string\|{ query: DocumentNode, variables?: TVariables}> \| ((mutationResult: FetchResult) => Array<string\|{ query: DocumentNode, variables?: TVariables}>) | 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. |