Open DragosRomaniuc opened 2 months ago
Generate a react query infinite hook.
Use the query:
Observe that the return type is wrong as data.data instead of data.pages (it actually returns data.pages)
Use useInfiniteQuery directly from @tanstack/react-query
Observe that the data sits inside data.pages
The infinite query return type is wrong data.data when it should be data.pages.
Have the correct type data.pages
useGetPaginatedEventsForUsersInfinite<PageDto & GetPaginatedEventsForUsers200AllOf, ErrorType<unknown>>(params?: GetPaginatedEventsForUsersParams, options?: { ...; }): UseInfiniteQueryResult<PageDto & GetPaginatedEventsForUsers200AllOf, ErrorType<...>> & { queryKey: QueryKey; } import useGetPaginatedEventsForUsersInfinite
…
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Max Memory: 2.63 GB / 32.00 GB Shell: 5.9 - /bin/zsh
npmPackages: orval: ^7.0.1 => 7.0.1 "@tanstack/react-query": "^5.51.11",
Please execute npx envinfo --system --npmPackages orval,zod,axios,msw,@tanstack/react-query and paste the results here.
npx envinfo --system --npmPackages orval,zod,axios,msw,@tanstack/react-query
What are the steps to reproduce this issue?
Generate a react query infinite hook.
Use the query:
Observe that the return type is wrong as data.data instead of data.pages (it actually returns data.pages)
Use useInfiniteQuery directly from @tanstack/react-query
Observe that the data sits inside data.pages
What happens?
The infinite query return type is wrong data.data when it should be data.pages.
What were you expecting to happen?
Have the correct type data.pages
Any logs, error output, etc?
Any other comments?
…
What versions are you using?
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Max Memory: 2.63 GB / 32.00 GB Shell: 5.9 - /bin/zsh
npmPackages: orval: ^7.0.1 => 7.0.1 "@tanstack/react-query": "^5.51.11",
Please execute
npx envinfo --system --npmPackages orval,zod,axios,msw,@tanstack/react-query
and paste the results here.