Skip to content

openapi-react-query: support for useQueries() #1807

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

Closed
michalfedyna opened this issue Aug 2, 2024 · 2 comments · Fixed by #1858
Closed

openapi-react-query: support for useQueries() #1807

michalfedyna opened this issue Aug 2, 2024 · 2 comments · Fixed by #1858
Labels
enhancement New feature or request openapi-react-query Relevant to openapi-react-query PRs welcome PRs are welcome to solve this issue!

Comments

@michalfedyna
Copy link
Contributor

@drwpow @kerwanp Do you guys think that it's possible to add support for useQueries()? I'll work on that but need some directions and opinions.

@kerwanp
Copy link
Contributor

kerwanp commented Aug 2, 2024

Hey! This definitely needs to be supported in the future!

I was thinking of something like this, I'm not a big fan of the "array tupple" so if you have a better idea feel free to share!

  const userQueries = $api.useQueries({
    queries: users.map((user) => ['get', '/api/users/{id}', { params: {  path: { id: user.id } } }]),
  })

@kerwanp kerwanp added enhancement New feature or request openapi-react-query Relevant to openapi-react-query labels Aug 2, 2024
@michalfedyna
Copy link
Contributor Author

I'll work on that over the weekend, I'll keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-react-query Relevant to openapi-react-query PRs welcome PRs are welcome to solve this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants