useQuery
with network-only
fetch policy renders data from cache when notifyOnNetworkStatusChange
is true
#12229
Labels
Issue Description
When using
useQuery
with fetch policynetwork-only
andnotifyOnNetworkStatusChange
set totrue
, it behaves likenetwork-and-cache
, returning data from cache instead of ignoring the cache.I'm using
notifyOnNetworkStatusChange
to get a re-render when recovering from an errored error by callingrefetch
so this is rather annoying that it breaks thenetwork-only
fetch policy for successful fetches.Link to Reproduction
https://codesandbox.io/p/devbox/still-bash-52hmpn
Reproduction Steps
Without
notifyOnNetworkStatusChange
:specific
It flashes
No Data
all
It flashes
No Data
With
notifyOnNetworkStatusChange
:specific
It flashes
No Data
all
No flash of
No Data
, instead renders data from cache@apollo/client
version3.12.3
The text was updated successfully, but these errors were encountered: