You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit package.json and move "@tanstack/react-query": "^5.0.0" from dependencies into peerDependencies
Run orval --config ./orval.config.js
What happens?
The generated output does not correctly detect hasQueryV5, and thus fails to generate the appropriate TS interfaces required for v5. For example, the getListPetsInfiniteQueryOptions is missing the ListPetsParams['limit'] type required to make v5 typecheck.
What were you expecting to happen?
The generated output should include the ListPetsParams['limit'] type.
Any logs, error output, etc?
N/A
Any other comments?
We use peer dependencies because we have a shared library that generates react query hooks, which is then used by other projects in a monorepo. It looks like a straightforward solution for now is to move the peer dependency back to devDependencies, but it seems like an easy fix to add peerDependencies to the list in getPackageByQueryClient.
+1 for implementing #1144 which would have made debugging this issue slightly easier :)
What are the steps to reproduce this issue?
package.json
andorval.config.js
package.json
and move"@tanstack/react-query": "^5.0.0"
from dependencies into peerDependenciesorval --config ./orval.config.js
What happens?
The generated output does not correctly detect hasQueryV5, and thus fails to generate the appropriate TS interfaces required for v5. For example, the
getListPetsInfiniteQueryOptions
is missing theListPetsParams['limit']
type required to make v5 typecheck.What were you expecting to happen?
The generated output should include the
ListPetsParams['limit']
type.Any logs, error output, etc?
N/A
Any other comments?
We use peer dependencies because we have a shared library that generates react query hooks, which is then used by other projects in a monorepo. It looks like a straightforward solution for now is to move the peer dependency back to
devDependencies
, but it seems like an easy fix to add peerDependencies to the list ingetPackageByQueryClient
.+1 for implementing #1144 which would have made debugging this issue slightly easier :)
What versions are you using?
The text was updated successfully, but these errors were encountered: