Re:Apollo Client – Demystifying Cache Normalization
by xiaomai on Wednesday April 07, 2021 @02:56PM
(#26729328)
I have observed this same thing and found it unintuitive, but I think it makes sense? technically your `profile` field could be returning anything (even though you're passing an `id` param in, you potentially could be doing something like returning a sibling profile for the given id). iirc, there is a thing called "cache redirects" that let you teach apollo the right thing to do here.
[ Parent
| on HN ]
Re:Apollo Client – Demystifying Cache Normalization
by candylifter on Wednesday April 07, 2021 @03:22PM
(#26729746)
Yup, you do it via type policies in v3
https://www.apollographql.com/docs/react/caching/advanced-to...