-
Notifications
You must be signed in to change notification settings - Fork 786
refetch issues on new rc versions #642
Comments
Hi @msmfsd, could you try this with the most recent versions of react-apollo and apollo-client? The rc's are a few weeks old and we've fixed a couple of bugs since then. |
Thanks @helfer I have updated and can confirm However after a network error if you do a refetch the So my question, is refetch meant to update the networkStatus to 4 and thus loading to true? |
@msmfsd yes, I think the loading status should change to 4 if a refetch is happening, even if there was an error before. If that's not the case in the latest version, could you try making a PR to fix it? 🙏 |
Thanks, will look to do this on the weekend. |
@helfer I cloned the Thanks for the help. |
Thanks @msmfsd! I still think there could be an issue in Apollo Client, so don't exclude that as a possibility when investigating. Maybe it's just not that easy to reproduce. |
@helfer you may be right, on refetch after a network status error i continue to see networkStatus not updated as expected. Have raised an issue on |
NOTE: this is an issue only with release candidate v1.0.0+ of
react-apollo
andapollo-client
. If this has been fixed in newer versions this can be closed.Steps to Reproduce
react-apollo
&apollo-client
to1.0.0-rc.3
&1.0.0-rc.6
.fetchPolicy: 'network-only'
option on any queries.onClick={() => refetch()}
that appears on any graphql error on your graphql component.Buggy Behavior
On click of refetch no new request is made to the server, it appears, possibly, that
react-apollo
initiates an action but sees the error in the apollo store and doesnt make a new network request.Expected Behavior
Refetch should make a new network request to the server and change
loading
totrue
,networkStatus
to4
and then updateloading
,networkStatus
&error
depending on the network response.Version
Related issue
#636
The text was updated successfully, but these errors were encountered: