Skip to content

React Query Configuration Error #241

@rayhankinan

Description

@rayhankinan

I think both of these lines have mismatched types:

queryConfig?: QueryConfig<typeof getComments>;

queryConfig?: QueryConfig<typeof getComments>;

Should both of these lines be defined as the following:

queryConfig?: InfiniteQueryConfig<typeof getInfiniteCommentsQueryOptions>

With InfiniteQueryConfig:

type InfiniteQueryConfig<T extends (...args: any[]) => any> = Omit<
  ReturnType<T>,
  "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam"
>;

Correct me if I'm wrong though

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions