Skip to content

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Sep 18, 2021

the change in shouldFetchOptionally was introduced in #2556 to avoid an infinite loop wen using suspense (see #2187), but it broke the case where we're switching keys between two erroneous queries - they now didn't refetch even though they should

this fix scopes the error check to only usages where suspense is turned on, so that we get the same behaviour as in v3.19.4 for non-suspense users, while still having the fix for suspense users

fixes #2682

the change in shouldFetchOptionally was introduced in TanStack#2556 to avoid an infinite loop wen using suspense (see TanStack#2187), but it broke the case where we're switching keys between two erroneous queries - they now didn't refetch even though they should

this fix scopes the error check to only usages where suspense is turned on, so that we get the same behaviour as in v3.19.4 for non-suspense users, while still having the fix for suspense users
@vercel
Copy link

vercel bot commented Sep 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/3kF7cA57PJ7D4gVEps1DLE2Y6b4G
✅ Preview: https://react-query-git-fork-tkdodo-feature-2682-e-5b3704-tannerlinsley.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 18, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 710e724:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration
elegant-einstein-fd0f0 Issue #2682

@TkDodo
Copy link
Collaborator Author

TkDodo commented Sep 18, 2021

@JaeYeopHan please have a look

Copy link
Contributor

@jbee37142 jbee37142 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@TkDodo TkDodo merged commit 1beedf9 into TanStack:master Sep 19, 2021
@TkDodo TkDodo deleted the feature/2682-error-query-doesn't-fire-again-when-keys-change branch September 19, 2021 06:11
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.24.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error query doesn't fire again when keys change

3 participants