openapi-typescript
openapi-typescript copied to clipboard
feat(openapi-react-query): Add query client to create client
Changes
This PR is similar to https://github.com/openapi-ts/openapi-typescript/pull/1814, but instead of adding the query client each time we call useQuery/useMutation/useSuspenseQuery/useInfiniteQuery, we pass the queryClient to the createClient once and for all. It is still possible to pass an other queryClient to those methods to override the default one if needed.
How to Review
Create a client by passing a queryClient, check that it is this client that is used instead of the default one.
Checklist
- [X] Unit tests updated
- [X]
docs/updated (if necessary) - [X]
pnpm run update:examplesrun (only applicable for openapi-typescript)