Hi All, I have a problem understanding how using `...
# apollo-kotlin
a
Hi All, I have a problem understanding how using
@skip
/
@include
directives affect the normalized cache. The scenario is we have 2 operations
query
and
subscription
that use the same fragment, we want some fields to not be subscribed in the subscription as they never change, to do this we added the
@skip
directive on fields of the fragment. The issue is with Apollo v2 the fields that are skipped from a subscription, they are updated as
null
on the Apollo store normalized cache and overrides data fetched from the query. Apparently this issue does not happen with Apollo v3. Could you please help understanding what caused this issue/(feature) with Apollo v2 and what was fixed in Apollo v3.
m
Looks like a bugfix. v2 was probably not reading the
@include
/`@skip` directives
a
Thanks for the reply. Might be pretty old code to dig around, I couldn't find a reference issue. But good to know it will not work with v2.
Doesn't look like there is an associated bug. Surely it was detected while working on the codebase
a
Noted. Thank you Martin as always.
🤗 1