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

Skip not working for useInfiniteQueries #4902

Open
Adityesh opened this issue Mar 19, 2025 · 1 comment · May be fixed by #4906
Open

Skip not working for useInfiniteQueries #4902

Adityesh opened this issue Mar 19, 2025 · 1 comment · May be fixed by #4906

Comments

@Adityesh
Copy link

Skip condition is not being enforced doesn't work when the condition is true, api is called regardless.

// rest
const { data, fetchNextPage } =
    useGetUsersInfiniteQuery(
      {
        search,
      },
      {
        skip: search.length <= 0
// rest

Image

Image

Image

Api is getting called with search being empty in the query params

@Adityesh
Copy link
Author

On further investigation, I noticed skip working for regular queries but not for infiniteQuery methods

@alexmotoc alexmotoc linked a pull request Mar 23, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant