-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add clear cache from the latest Apollo #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Let's add a protocol (or set of protocols) like
AWSAppSyncApolloExtensions
to clearly define the changes we're adding to the core Apollo. That will help us identify the changes we've made when the time comes to upgrade. - The change on the face of it looks good, but we will need to have test coverage of the new functions in order to merge. We can do this when we evaluate & merge the PR, but having tests as part of this PR would speed up the process.
@palpatim this PR includes copy of the functionality from Apollo. So I don't think that it should be included into |
d95e200
to
b7333e2
Compare
b7333e2
to
1590ecc
Compare
Just added test |
I don't feel super strongly the protocol as the only way to document the changes we're making from the core Apollo code, but I do want to make sure we capture the variations that we introduce so we can ease the transition for the future. What about a separate (I recognize that this in some sense closes the barn door after the horse has escaped--we've already made changes to Apollo that haven't been clearly documented--so it's on us to go back and complete that documentation as I described in my comment on #131.) |
@palpatim I complete agree with you idea. But as I mentioned this PR doesn't have any specific changes, it copies 1-by-1 code from the latest Apollo repository. I propose the following approach.
|
As another part of this, we need to ensure we have AppSync-specific tests that cover the behavior we're relying on, especially the behavior we changed (closely related to the documentation requirement below).
I look forward to seeing a proposal. As I'm sure you recognize, this would be a pretty large undertaking, since it needs to be something we can support cross-platform.
The reason I suggested a README at the top level of the Apollo directory is that it slightly increases discoverability for people who browse to the Apollo directory on GitHub. However, it's probably worth calling out in the top-level README as well, probably in an "AWSAppSync and Apollo" section or similar. I'll take that change on for a followup to this PR.
I think the Apollo-specific pieces you've outlined here are a good goal, but obviously getting PRs accepted into Apollo would be outside our control. :) |
I think this's a huge par of work. I won't be able doing it since I don't have so many time on open-source to do it. So I just can cross fingers that someone implements it.
I agree, but it depends. But here's simple rule: if PR is accepted then just merge latest Apollo, if not - leave it as an internal AppSync feature. |
Released on 2.9.2 |
Just an FYI in case someone else stumbles on this... This call only deletes the data cache. It does not touch the other new caches for AppSync (subscriptions, offline writes) |
Issue: #36
Description of changes:
Added functionality to clear client cache manually.
The was just copied from the latest Apollo +
AWSSQLLiteNormalizedCache
conformance of the newclear()
method.Hope that taking the only clear cache from #131 will speed up the acceptance of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.