openapi-typescript
openapi-typescript copied to clipboard
openapi-react-query: support for useQueries()
@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.
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 } } }]),
})
I'll work on that over the weekend, I'll keep you updated.