-
Notifications
You must be signed in to change notification settings - Fork 786
After a graphQL error (ex: status code 404) the component won't update with loading until a successfull request #3491
Comments
What version of react-apollo and apollo-client are you using? Do you have the |
I'm using 3.1.0 and I tryed playing around with notifyOnNetworkStatusChange, true or false it has no impact on my problem. setting fetchPolicy "no-cache" or "network-only" is pretty much the only thing that solves the problem but i really don't want to do it. |
Could you please create a runnable reproduction that shows the issue you're experiencing? Maybe using something like codesandbox.io? |
Is there a simple solution to mock the server response with an error status code ? |
It's quite some work to produce the sandbox out of the blue i imagine you have a set of your own I could fork and modify ? |
After some struggling and tests, it happens that I was using apollo-client after upgrading all my apollo dependencies to the latest :
My problem got fixed and transformed into this very well identified one : So I close the issue |
Say you have component wrapped by the HOC graphql from 'react-apollo';
Say you make a request with params (variables).
And imagine the following scenario :
I would expect :
Instead i have :
I tryed to make my way around this by catching the error 404 in the onError from 'apollo-link-error' and doing
response.errors = null;
Catching the error kind of improve my situation, my previous scenario goes like this :
But it's a pain that I still have an error, not detailed once read in
data
in the component althought i catched it...That makes me belive :
The text was updated successfully, but these errors were encountered: