You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feature request for the react-query generator. I would like to use the generated query options with useQueries, while also using a hook mutator.
The useListPetsQueryOptions function accepts parameters, and returns the query options. But you cannot run hooks in a loop.
What were you expecting to happen?
I would expect that there is a way to get an option generator.
For example, this already exists for the query function itself. The useListPetsHook returns a function.
In the same style, I would also expect a useListPetsQueryOptionsHook or useListPetsQueryOptionsGenerator or useGetListPetsQueryOptions, that could be used like this:
For me, it would also be okay if the current use*QueryOptions is changed instead of introducing a new hook - but that would of course be a breaking change.
The text was updated successfully, but these errors were encountered:
First of all, thanks for this amazing library!
I have a feature request for the
react-query
generator. I would like to use the generated query options withuseQueries
, while also using a hook mutator.What happens?
A currently generated function is, for example:
orval/samples/react-query/hook-mutator/endpoints.ts
Lines 51 to 79 in b24ef85
The
useListPetsQueryOptions
function accepts parameters, and returns the query options. But you cannot run hooks in a loop.What were you expecting to happen?
I would expect that there is a way to get an option generator.
For example, this already exists for the query function itself. The
useListPetsHook
returns a function.In the same style, I would also expect a
useListPetsQueryOptionsHook
oruseListPetsQueryOptionsGenerator
oruseGetListPetsQueryOptions
, that could be used like this:For me, it would also be okay if the current
use*QueryOptions
is changed instead of introducing a new hook - but that would of course be a breaking change.The text was updated successfully, but these errors were encountered: