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

Cache clarification #1710

Merged
merged 2 commits into from
Aug 24, 2021
Merged

Cache clarification #1710

merged 2 commits into from
Aug 24, 2021

Conversation

morgz
Copy link
Contributor

@morgz morgz commented Mar 11, 2021

I'm just spit balling the kind of explanation I'd have found useful. Feel free to use or discard and please let me know if my understanding is incorrect. Thanks!

I'm just spit balling the kind of explanation I'd have found useful. Feel free to use or discard and please let me know if my understanding is incorrect. Thanks!
@designatednerd
Copy link
Contributor

This is helpful - I need to do some noodling on this but I will probably use this as a jumping off point. Thank you!

@Nickersoft
Copy link
Contributor

Just found this PR and I think this is definitely something that needs to be clarified in the documentation :) Unlike the React docs, which strongly encourages manually updating the cache after mutations/subscriptions to propagate to the rest of the app, the current iOS docs only show examples in which the result of subscription or mutation are used to manually update the UI (such as appending to an array and refreshing a table view). Given the fact that Swift is strongly typed, unlike JS objects, figuring out how to manually update the cache becomes more ambiguous.

For the time being, I've gone back to simply refetching queries after subscriptions, but I would love to see this PR rounded out and pushed through, because constantly refetching impacts performance. Just thought I'd give my two cents!

@AnthonyMDev AnthonyMDev merged commit 97694a4 into apollographql:main Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants