Skip to content

Add note to the docs about shared options #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,7 @@ const [mutate, { status, data, error, reset }] = useMutation(mutationFn, {
onSettled,
throwOnError,
useErrorBoundary,
{ ...selectedUseQueryOptions },
})

const promise = mutate(variables, {
Expand Down Expand Up @@ -2216,6 +2217,8 @@ const promise = mutate(variables, {
- `useErrorBoundary`
- Defaults to the global query config's `useErrorBoundary` value, which is `false`
- Set this to true if you want mutation errors to be thrown in the render phase and propagate to the nearest error boundary
- `selectedUseQueryOptions`
- *Selected* options of `useQuery` are also applicable here. E.g. `retry` and `retryDelay` can be used as described in the [`useQuery` section](#usequery). *Documentation of these options will be improved in the future.*

### Returns

Expand Down