7nohe / openapi-react-query-codegen

OpenAPI React Query Codegen is a code generator for creating React Query (also known as TanStack Query) hooks based on your OpenAPI schema.
https://openapi-react-query-codegen.vercel.app
MIT License
289 stars 28 forks source link

Generates incorrect queryKeys for Infinite queries #140

Open AnderssonPeter opened 2 months ago

AnderssonPeter commented 2 months ago

Describe the bug Generates incorrect queryKeys for Infinite queries, the page is expected to be sent into the KeyFn.

To Reproduce Steps to reproduce the behavior:

Expected behavior I think you need 2 sets for KeyFn functions one for Infinite queries and one for the normal request. Where the Infinite version excludes the page.

Screenshots image

hanahem commented 2 months ago

Oh thanks for raising this one, I think it causes the issue I raised here: https://github.com/7nohe/openapi-react-query-codegen/issues/139