Skip to content
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 issue with 1.1.1 #1633

Closed
harmon25 opened this issue Apr 28, 2017 · 2 comments
Closed

Refetch issue with 1.1.1 #1633

harmon25 opened this issue Apr 28, 2017 · 2 comments

Comments

@harmon25
Copy link

Intended outcome:
Being able to refetch on a query without fetchPolicy defined.

Apollo-Client - 1.1.1
React-Apollo - 1.1.1

How to reproduce the issue:
Try to refetch a simple query.
Am getting the following error:
image

If I use 1.1.0 of Apollo Client - the refetch works as intended.
Appears this fix - Fix: Remove ability to set default fetchPolicy, which broke polling queries PR #1630
Has broken the ability to refetch a simple query.

Thanks for the help!

@helfer
Copy link
Contributor

helfer commented Apr 28, 2017

@harmon25 Thanks for reporting the issue, it's very odd. Reverting that PR should not break anything that wasn't broken before. In addition, we have tests for refetch. I would think it much more likely that 1.1.0 has broken refetch. Are you sure about the version that you're running? Sometimes there can be multiple versions installed, for example one directly, and one through react-apollo.

In any case, would you be able to put together a quick reproduction using the error template if the error persists? That way I can debug it.

@harmon25
Copy link
Author

harmon25 commented Apr 29, 2017

Hm OK does appear having both apollo-client and react-apollo as dependencies is unnecessary and possibly causes some weird behaviour. Not really the problem though, more to do with fetchPolicy set to cache-only after unmount - which is what is happening in my application...

This is related to the following react-apollo issue:
apollographql/react-apollo#622

Going to close for now, move any input/discussion there.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants