Missing networkStatus for "cache ready and loading from network"
See original GitHub issueIntended outcome:
When I use fetchPolicy: 'cache-and-network'
I can’t know if the data is loaded from cache or if it’s the first time the component load.
Actual outcome:
networkStatus
should be equal to 1 when the components loads without cache and it should be 5 if its fetching from network but has the data from cache.
How to reproduce the issue:
Use fetchPolicy: 'cache-and-network'
and console.log(this.props.data.networkStatus)
Actually I’m using Object.keys(this.props.data).length === 10
to check, true
if there is no data.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Queries - Apollo GraphQL Docs
When loading is false and there is no error , the query has completed. ... To see this caching in action, let's build...
Read more >Benjie on Twitter: "Ooo! And it's got a `loaded` prop! The lack of this ...
Missing networkStatus for "cache ready and loading from network " · Issue ... if the data is loaded from cache or if it's...
Read more >How to use the apollo-client.NetworkStatus.ready function in ...
To help you get started, we've selected a few apollo-client.NetworkStatus.ready examples, based on popular ways it is used in public projects.
Read more >What does notifyOnNetworkStatusChange do exactly?
It seems like notifyOnNetworkStatusChange: true is to allow us check the current networkStatus of your useQuery , which is a number.
Read more >Netlogon event ID 5719 or Group Policy event 1129
In Windows 10 and later versions, event 5719 is no longer logged in this ... The Netlogon service starts before the network is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Has there been any development on this? When using
cache-and-network
, the network status is always 1, regardless of what’s triggering it.Closing this for lack of activity. In a future API version, I think it would be great to expose this as
source
on the result.