-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[3.0] Eviction of fields by specific arguments #6141
[3.0] Eviction of fields by specific arguments #6141
Conversation
@danReynolds: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
c6b62e2
to
818cc82
Compare
This comment has been minimized.
This comment has been minimized.
0037460
to
28b139e
Compare
572afc9
to
eb79a07
Compare
e67d56e
to
f2a07d5
Compare
575f532
to
1a91d05
Compare
When calling cache.evict, we do not have a FieldNode, so we cannot supply variables to be combined with the field's arguments, but must instead provide the fully-resolved arguments object. To make this work, the context argument of KeyArgsFunction no longer provides context.variables, since that information is not always available. The arguments passed as the first argument to the KeyArgsFunction should be sufficient to compute the field identity.
1a91d05
to
edff808
Compare
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.
Approved with some tweaks to deal with args
rather than variables
(a subtle distinction, but important here IMO). Thanks for your patience @danReynolds!
Implementation of eviction by arguments API discussed here: #6098.
Evicts entities in the cache with exact matches of field names and arguments.