-
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
fetchMore sets networkStatus to 1 #6907
Comments
@gergof In my case, @apollo/client: 3.1.3 |
@DanielMarkiel Yes, it does the same thing for me as well:
|
They made a change on the behavior of the fetch policies Have you tried using The doc is not up to date yet but there are some comments on issues like #6760 (comment), #6819 (comment)... I think we might soon configure it globally if that's the kind of behavior you prefer : #6833 (comment) |
@Alex153 Thanks for explanation! You've saved my day. |
Thank you @Alex153. This solves the problem. |
Intended outcome:
When calling the fetchMore function of a query the networkStatus should be set to 3 and remain 3 for the entire duration of the request as in Apollo Client 2.
Actual outcome:
After I call fetchMore on a query that has
{ notifyOnNetworkStatusChange: true, fetchPolicy: 'cache-and-network' }
as its parameters the networkStatus is set to 3 for a moment of time, but then it becomes 1:How to reproduce the issue:
I couldn't reproduce the issue in the sandbox, but this is my setup: https://codesandbox.io/s/happy-bhabha-rjyt0.
I'm using react-native with the following code:
Versions
System:
OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
Binaries:
Node: 14.8.0 - /usr/bin/node
npm: 6.14.8 - /usr/bin/npm
Browsers:
Firefox: 68.11.0esr
npmPackages:
@apollo/client: ^3.1.3 => 3.1.3
apollo-cache-persist: ^0.1.1 => 0.1.1
The text was updated successfully, but these errors were encountered: