Closed mstykow closed 1 year ago
Apollo recently improved the typing of the cache.modify function by introducing generics. Since apollo-cache-policies mimics the cache interface which includes the modify function, the created cache is no longer type compatible as of Apollo 3.8.0.
cache.modify
apollo-cache-policies
modify
Apollo PR: https://github.com/apollographql/apollo-client/pull/10895
In particular this commit: https://github.com/apollographql/apollo-client/commit/e187866fdfbbd1e1e30646f289367fb4b5afb3c3
Change required here (need to introduce generics): https://github.com/NerdWalletOSS/apollo-cache-policies/blob/ece8b039e35ba1e24f0e0e905efe0de3200ae55a/src/cache/InvalidationPolicyCache.ts#L141
Great library! Thank you!!
Thanks for letting us know! Updated it in the 2.10.0 release!
Apollo recently improved the typing of the
cache.modify
function by introducing generics. Sinceapollo-cache-policies
mimics the cache interface which includes themodify
function, the created cache is no longer type compatible as of Apollo 3.8.0.Apollo PR: https://github.com/apollographql/apollo-client/pull/10895
In particular this commit: https://github.com/apollographql/apollo-client/commit/e187866fdfbbd1e1e30646f289367fb4b5afb3c3
Change required here (need to introduce generics): https://github.com/NerdWalletOSS/apollo-cache-policies/blob/ece8b039e35ba1e24f0e0e905efe0de3200ae55a/src/cache/InvalidationPolicyCache.ts#L141
Great library! Thank you!!