Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jerrynim opened this issue Apr 1, 2024 · 6 comments

Comments

@jerrynim
Copy link

jerrynim commented Apr 1, 2024

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

@AngeelVallem
Copy link

Any updates?

@ahammer-sc
Copy link

Also experiencing this error. I believe the type definitions of QueryKeyFactory need to be updated to have signal be optional

@apenab
Copy link

apenab commented Sep 2, 2024

I'm facing the same bug

@joeyfigaro
Copy link

This is causing issues with other config properties (mutationKey and queryKey) when using any typed or common meta. Has anyone made any progress on investigating?

@apenab
Copy link

apenab commented Sep 11, 2024

I fixed the problem migrating to the latest version of RQ. the v5

@AngeelVallem
Copy link

@apenab could you show your RQ and query-key-factory versions please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants