openapi-react-query-codegen icon indicating copy to clipboard operation
openapi-react-query-codegen copied to clipboard

Generates incorrect queryKeys for Infinite queries

Open AnderssonPeter opened this issue 1 year ago • 1 comments

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:

  • Generate client using openapi-rq --pageParam page --input https://localhost:44353/swagger/v1/swagger.json --output src/openapi/.
  • Compile code 💥

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

  • OS: Windows 11
  • Version v1.6.0

AnderssonPeter avatar Aug 19 '24 13:08 AnderssonPeter

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

hanahem avatar Aug 20 '24 11:08 hanahem