From f35bed93a2a3ec5c1cf5243f35e5376331892f6b Mon Sep 17 00:00:00 2001 From: Arnav Deo Date: Mon, 2 Mar 2026 21:43:29 +0530 Subject: [PATCH] packages/openapi-react-query: Update createClient documentation Update createClient documentation in openapi-react-query to point out incompatibility between `@tanstack/react-query`'s `QueryClient` and the generated `OpenapiQueryClient`. The current documentation assumes that the user has constructed a `QueryClient` already, the updated documentation explicitly brings forward the same assumption --- packages/openapi-react-query/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/openapi-react-query/README.md b/packages/openapi-react-query/README.md index 50a521c4b..fbac3ac66 100644 --- a/packages/openapi-react-query/README.md +++ b/packages/openapi-react-query/README.md @@ -29,6 +29,8 @@ npx openapi-typescript ./path/to/api/v1.yaml -o ./src/lib/api/v1.d.ts Once your types have been generated from your schema, you can create a [fetch client](../openapi-fetch), a react-query client and start querying your API. +Note that the returned `OpenapiQueryClient` is not a react-query client, you still need to construct a `QueryClient` and pass it to ``. The returned `OpenapiQueryClient` only provides type-inferred wrappers over the actual `useQuery` / `useMutation` / etc. hooks. + ```tsx import createFetchClient from "openapi-fetch"; import createClient from "openapi-react-query";