File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/plugins/other/visitor-plugin-common/src Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -599,9 +599,14 @@ export class SelectionSetToObject<Config extends ParsedDocumentsConfig = ParsedD
599599 continue ;
600600 }
601601
602- // 2. Handle Fragment selection nodes
603- // 2a. If `inlineFragmentTypes` is 'combine' or 'mask', the fragment is masked i.e. do not generate inline types
604- // In some cases like Apollo `@unmask`, the fragment would be generated inline.
602+ // 2. Handle Fragment Spread nodes
603+ // A Fragment Spread can be:
604+ // - masked: the fields declared in the Fragment do not appear in the operation types
605+ // - inline: the fields declared in the Fragment appear in the operation types
606+
607+ // 2a. If `inlineFragmentTypes` is 'combine' or 'mask', the Fragment Spread is masked by default
608+ // In some cases, a masked node could be unmasked (i.e. treated as inline):
609+ // - Fragment spread node is marked with Apollo `@unmask`, e.g. `...User @unmask`
605610 if ( this . _config . inlineFragmentTypes === 'combine' || this . _config . inlineFragmentTypes === 'mask' ) {
606611 let isMasked = true ;
607612
@@ -618,7 +623,7 @@ export class SelectionSetToObject<Config extends ParsedDocumentsConfig = ParsedD
618623 }
619624 }
620625
621- // 2b. If the Fragment is not masked, handle Fragment Spreads by generating inline types.
626+ // 2b. If the Fragment Spread is not masked, generate inline types.
622627 const fragmentType = this . _schema . getType ( selectionNode . onType ) ;
623628
624629 if ( fragmentType == null ) {
You can’t perform that action at this time.
0 commit comments