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

refetch is gone after remount? #142

pfulop opened this Issue Aug 15, 2016 · 2 comments


None yet
3 participants
Copy link

pfulop commented Aug 15, 2016

I have noticed that after upgrade to new version with new api, I sometimes don't get refetch in props. By sometimes I mean when component is remounted (I go to other page and go back using react-router).

This is on first load
errors : null fetchMore : (vars) loading : true refetch : (vars) startPolling : (pollInterval) stopPolling : () variables : undefined __proto__ : Object

This is after remount:
errors : null getMyLastParticipations : Array[1] loading : false variables : undefined __proto__ : Object

I am not sure If I am just not getting some part of how the client works, but I would really need refetch to be available at all times. For example, if user logouts and then other user login, he will see old users data since the refetch didn't happen.


This comment has been minimized.

Copy link

jbaxleyiii commented Aug 15, 2016

@pfulop thanks for the report! I'll take a look!


This comment has been minimized.

Copy link

jbaxleyiii commented Aug 16, 2016

Yep this was a bug! refetch and fetchMore don't exist before the componentDidMount method is called since an observable query isn't setup yet. I've added a mocked way to call those which will run a normal query until they are replaced by the actual observer.

Thanks for reporting!

@jbaxleyiii jbaxleyiii closed this Aug 16, 2016

@zol zol removed the in progress label Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment