query-key-factory icon indicating copy to clipboard operation
query-key-factory copied to clipboard

Property 'pageParam' does not exist on type '{ queryKey: QueryKey; signal: AbortSignal; meta: Record<string, unknown> | undefined;

Open jerrynim opened this issue 4 months ago • 2 comments

Hi I'm trying to use createQueryKeys with useInfiniteQuery

when use ctx.pageParam type error occurred

Error Message

Property 'pageParam' does not exist on type '{ queryKey: QueryKey; signal: AbortSignal; meta: Record<string, unknown> | undefined; }'.ts(2339)

my Code is here

  mails: (params) => ({
    queryKey: [params],
    queryFn: (ctx) =>
      getRequest({ ...params, page: ctx.pageParam }),
  }),

is there any way to use createQueryKeys with useInfiniteQuery

jerrynim avatar Apr 01 '24 06:04 jerrynim