-
Notifications
You must be signed in to change notification settings - Fork 21
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
Compatibility with apollo3-cache-persist (Reopening issue 35) #47
Comments
I also noticed this recently as I'm starting to experiment with cache invalidation more and more. To be fair I'm not entirely sure that using both libraries has ever worked for me - I might have accidentally temporarily disabled the persist plugin while testing. Neither v1.5.0, v2.0.0, v2.0.2 nor v2.3.0 seems to ever invalidate entries when combined with [email protected]. |
Thanks for the repro! I'll take a look later today |
Hey @ericaiq ! Getting back to this, had a busy week with work. Thanks for the great sandbox, found the issue. We had not been reinitializing all of the necessary objects when apollo3-cache-persist would call |
Thanks for looking into this! We actually decided to go in a different direction for the project I am working on. I'm still noticing some weirdness in the sandbox. Notably that the initial call to allFilms isn't cached. I'm not sure if this is a sandbox set up issue or an issue with the cache. Repro:
|
Can confirm that what @ericaiq described above is happening for me too. |
@mogelbrod I think I found an issue and just released 2.4.1. When I run the original sandbox posted above on 2.4.1 (make sure to run |
@danReynolds looks like v2.4.1 fixes the issue with relay style pagination, much appreciated! |
Woohoo! That was a tricky one. Thanks for your patience and persistence! 🙏 |
Hi, I'm having trouble using
apollo-cache-policies
along with theapollo3-cache-persist
library in a React Native project. This issue is most likely the same as #35. I have gotten anInvalidationPolicyCache
to work without persistence. However the data is never refreshed once I persist the cache.I modified a sandbox to repro the issue here. (Original sandbox from this issue)
Repro Steps:
Expected:
4. List is refreshed with a new network request
Actual:
4. List is not refreshed, the data is loaded from the cache.
The same steps result in the list being refreshed if apollo-cache-persist is not being used (comment out line 47). Any advice for getting these two libraries to work?
Let me know if you need more info. Also, this is my first time working with Apollo. This could easily be my fault. Thanks!
The text was updated successfully, but these errors were encountered: