-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove any dangling references when removing records #85
Comments
There is ApolloStore.remove(cacheKey: CacheKey, cascade: Boolean). Would that work? |
This method with flag From
From
So this method loads the record from database, retrieves But what about referencing field? There should be a solution to remove references from For example:
And then clear that referencing field from the record by |
Hoping to dig into this soon. I'm realizing just now that
I think something similar would work. Compared to cascade delete, that'd keep the dangling reference around in case it becomes valid again. I think that could be handy? I tweaked the name of this issue a bit so that it's more clear in apollographql/apollo-kotlin#2331 |
In #83 an API has been added to remove all dangling references. Keeping this issue open as it may still be useful to have a way to remove them at the same time as |
ApolloStore: does
remove(key: CacheKey)
method removeApolloCacheReference
field in related records? I mean a mechanism like "ON DELETE CASCADE SET NULL" in RDBMS.The text was updated successfully, but these errors were encountered: