-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow passing params and queries (ZodiosRequestOptions) to mutate() #252
Comments
This would be important. A common use case:
If your With vanilla react-query, you can do this by providing a |
Any updates on this? Without breaking the current API, I might suggest passing optional queries and path params to the second parameter of const { mutateAsync } = hooks.usePost('/book/:id');
const onClick = () => {
await mutateAsync({ ...body }, { queries: { action: '...' }, params: { id: '... } });
} |
This will be available on v11 as it's a breaking change |
Hey any updates on this? |
I'm waiting for tanstack query v5 before releasing v11, else this would be Bad to release another breaking change soon after. |
https:/TanStack/query/releases/tag/v5.0.0-rc.1 just came out, would be really nice to have this feature 😊 |
currently
hooks.use[Alias]
(and other mutation hooks) require passingparams
andqueries
to the hook callit would be nice to be able to pass that to
.mutate()
instead, for cases where a param or query is not held in state / not known during the hook callThe text was updated successfully, but these errors were encountered: