8000 InfiniteQueryOptions should omit `initialPageParam` and `getNextPageParam` · Issue #156 · 7nohe/openapi-react-query-codegen · GitHub
[go: up one dir, main page]

Skip to content
InfiniteQueryOptions should omit initialPageParam and getNextPageParam #156
Open
@JonasPf

Description

@JonasPf

Describe the bug

The code generator generates infinite query options like this:

Omit<UseInfiniteQueryOptions<TData, TError>, "queryKey" | "queryFn">

While this works for normal queries, it does not work for infinite queries because it enforces a type for options with initialPageParam and getNextPageParam as required attributes.

To Reproduce

Run pnpm generate:api in examples/react-app and look at /openapi/queries/infiniteQueryes.ts

OpenAPI spec file

See examples

Expected behavior

It should generate it like this:

Omit<UseInfiniteQueryOptions<TData, TError>, "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0