NerdWalletOSS / apollo-cache-policies

An extension of the Apollo 3 cache with support for advanced cache policies.
Apache License 2.0
156 stars 22 forks source link

fix a bug where fields with aliases and an expired TTL were not evicted #41

Closed danReynolds closed 2 years ago

danReynolds commented 2 years ago

Closes a second issue described in #39. Fields with aliases are stored by their field name, not their alias name in the cache so we were trying to look them up in the EntityTypeMap by their alias name and incorrectly missing evicting them. This fix handles properly evicting expired aliased fields and filtering them out of the returned query result.