Skip to content
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

[openapi-react-typescript] discrepency between queryOptions and other hook #1929

Closed
1 task
tifosiblack opened this issue Sep 25, 2024 · 1 comment · Fixed by #1952
Closed
1 task

[openapi-react-typescript] discrepency between queryOptions and other hook #1929

tifosiblack opened this issue Sep 25, 2024 · 1 comment · Fixed by #1952
Labels
bug Something isn't working openapi-fetch Relevant to the openapi-fetch library

Comments

@tifosiblack
Copy link

Description

Thanks for the new queryOptions, it's really useful for prefetching queries in the route loaders. However I have a small issue with queryOptions. The third parameter seems required, even when no parameters is expected.

image

vs

image

image

Reproduction

Last Typescript version (don't know if it matters), an endpoint in the openapi which doesn't need any parameter.
queryOptions should behave the same than other hooks.

Expected result

queryOptions always requires a third parameter (an empty object do the trick however).

Checklist

@tifosiblack tifosiblack added bug Something isn't working openapi-fetch Relevant to the openapi-fetch library labels Sep 25, 2024
@lukasbash
Copy link

Experiencing the same issue and also noted it in the one I opened (#1946).
What is weird is that it works if you initialize the options to a variable before you pass them to any function call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openapi-fetch Relevant to the openapi-fetch library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants