-
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
Polling (and force fetch in general) while the client is disconnected empties the store after erroring #334
Comments
Good point! Will look into this. Error handling in general is something we are taking a look at soon. |
Yes, then, in this case, I would be for, by default, not delete the contents of the store. (I thought the behavior was wanted if graphql errors arised) |
I can look into that if you want as well, I will need a fix pretty ASAP and I see you guys already have a bunch of projects going on! 😉 |
We were going to take a look at error handling late this week or early next week, but I'd be happy to look at a design for a fix, or a PR! |
Let me just finish first with #335, I'll see after that! |
I attempted to reproduce this issue within a unit test in #368 but wasn't able to do it. Maybe I'm misunderstanding the problem or the problem is somewhere else, but it seems that the store is not emptied if we have a polling query that faces a network/connection error of some kind. Could you provide some insight as to what setup leads to this issue @rricard ? |
I need to retake a look. Maybe a recent change may have fixed that. |
@Poincare: my bad the issue is on apollostack/react-apollo: when an error is associated to the component, the component doesn't receive the data anymore. |
Expected
If the polling fails because of a connection issue, still show errors in the console and everything, but don't change the contents of the store!
Obtained
If the polling fails because of a connection issue, errors arise in the console and empties the store where the query is.
Is this really the behavior we want ?
Fix proposition
Polling shouldn't just trigger a
forceFetch
but aforceFetch
able to, when an error arises, don't change the apollo store state.The text was updated successfully, but these errors were encountered: