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

resetStore messes with fetchPolicy and loading state updates #11256

Closed
522122 opened this issue Sep 27, 2023 · 5 comments
Closed

resetStore messes with fetchPolicy and loading state updates #11256

522122 opened this issue Sep 27, 2023 · 5 comments
Labels
🔍 investigate Investigate further

Comments

@522122
Copy link

522122 commented Sep 27, 2023

Issue Description

In 3.8.x refetch causes loading updates. This did not happen in 3.7.17.

Link to Reproduction

https://codesandbox.io/p/sandbox/friendly-panini-g7dprw

Reproduction Steps

  • have a query with fetchPolicy 'cache-and-network'
  • call refetch - loading is updated from false -> true -> false
  • call client.resetStore
  • call refetch - loading is no longer updating
@jerelmiller jerelmiller added 🔍 investigate Investigate further 🏓 awaiting-team-response requires input from the apollo team labels Sep 28, 2023
@bignimbus
Copy link
Contributor

Hi @522122 👋🏻 thanks for your patience! I'm looking at your codesandbox and I'm not seeing a difference between 3.7 and 3.8. I'm probably missing something obvious, apologies in advance! If you could give me just a bit more guidance it would help me know what to look for.

@bignimbus bignimbus added 🏓 awaiting-contributor-response requires input from a contributor and removed 🏓 awaiting-team-response requires input from the apollo team labels Oct 20, 2023
@522122
Copy link
Author

522122 commented Oct 20, 2023

Hi, thanks for reply, 3.8.6 is working the same way as 3.7.17. But at the time of opening this, in 3.8.4 refetch caused updates of loading state and after calling resetStore it stopped updating loading states.
My best guess is that it was fixed in #11235

@github-actions github-actions bot removed the 🏓 awaiting-contributor-response requires input from a contributor label Oct 21, 2023
@phryneas
Copy link
Member

As the issue seems to be fixed (thanks for those CodeSandboxes demonstrating that!), are you okay with us closing the issue? :)

@522122 522122 closed this as completed Oct 23, 2023
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 investigate Investigate further
Projects
None yet
Development

No branches or pull requests

4 participants