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
Using openapi-react-query the provided code from the client returns the wrong type from the queryOptions, regardless of the API function behind.
When using useQuery directly everything is inferred correctly.
Reproduction
Simply create a basic API function and inspect the evaluated types of both variants. The one coming from queryOptions is always undefined.
A sidenote: For some reason I am forced to pass a third parameter to the queryOptions call, whereas the docs state it is optional. When omitting the third parameter I am facing this error:
Expected result
The type should be identical between in both usage scenarios. Also the function signature should comply to the docs or vice versa.
Description
Using
openapi-react-query
the provided code from the client returns the wrong type from thequeryOptions
, regardless of the API function behind.When using
useQuery
directly everything is inferred correctly.Reproduction
Simply create a basic API function and inspect the evaluated types of both variants. The one coming from
queryOptions
is alwaysundefined
.As an example code I used:
foo
evaluates, whilebar
does not.See:
versus
A sidenote: For some reason I am forced to pass a third parameter to the
queryOptions
call, whereas the docs state it is optional. When omitting the third parameter I am facing this error:Expected result
The type should be identical between in both usage scenarios. Also the function signature should comply to the docs or vice versa.
Checklist
The text was updated successfully, but these errors were encountered: