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

Unexpected Result with Nullish Coalescing and Ternary Operators in React Query's infinite query key #786

Open
nanopang opened this issue Jul 19, 2024 · 0 comments

Comments

@nanopang
Copy link

Which packages are impacted by your issue?

@graphql-codegen/typescript-react-query

Describe the bug

While using the generated infinite query function and providing the queryKey option, it uses the [XXX.infinite] instead of the provided queryKey.

  • CleanShot 2024-07-19 at 16 51 55

Your Example Website or App

nanopang@95c2a72

Steps to Reproduce the Bug or Issue

  1. Codegen typescript-react-query with addInfiniteQuery
    2.Pass the queryKey value to the generated Infinite query
    3.It will ignore the queryKey

Expected behavior

use the provided optionsQueryKey instead of the [XXX.infinite]

Screenshots or Videos

No response

Platform

  • OS: MacOS
  • NodeJS: 20.12.2
  • graphql version:16.8.1
  • @graphql-codegen/typescript-react-query version(s): 6.1.0

Codegen Config File

No response

Additional context

No response

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

1 participant