-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
useQuery.networkStatus doesn't update status to (4). The refetch happens from mutation with refetchQueries #10827
Comments
Hi @CavidM 👋🏻 thanks for opening this issue! I'd be happy to take a look at this but I'm not certain how to help with the information given. We have a CodeSandbox template that you could fork to demonstrate the issue in a way that matches how your Apollo Client instance is configured. Any more detail you could provide would be helpful 🙏🏻 |
Hi. Sure, please see my code under comment (javid's code). |
Thanks so much @CavidM 🙏🏻 I was able to reproduce the issue as you described. Interestingly, when I change the |
A few other findings I'm sharing for posterity:
This code snippet was of interest: apollo-client/src/core/QueryManager.ts Lines 806 to 808 in 86ca77c
Based on the fact that an object with a |
And one more finding: #7813 introduced this apollo-client/src/core/QueryManager.ts Lines 845 to 847 in 86ca77c
Given this context, it makes sense why you're seeing |
Thank you so much @bignimbus. |
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. |
here is mutation trigs refetching
here networkStatus is always 7
Reproduction steps:
create any query. and send your first request.
on some another place run some mutation and pass refetchQueries to the query you just run.
you expect to see networkStatus is 4 during refetching but it is 7 and only after the query is done
The text was updated successfully, but these errors were encountered: