Closed kitten closed 4 months ago
Latest commit: b04d84dde02de05aaf11a2c76a941d2d35e178b7
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Summary
This fixes
@_optional
to work when the selection contains a sub-selection fragment spread. Previously, other fragment spreads inside an@_optional
spread would become non-optional/non-required again, since the value ofdeferRef
would be reset with anotherisOptional()
check.This also applies the same principle to
@defer
. Previously,@defer
would cascade to all child selection fields. This meant that any field nested inside a@defer
-ed fragment would be able to be deferred and be completely optional, even if it's direct parent wasn't a deferred fragment spread.Set of changes
deferRef
reset frommakeContext
deferRef
with every new child field and only cascade it across fragment spreadsoptionalRef
across fragment spreads (but also not new child fields)makeSelectionIterator
is to prevent future mistakes