Skip to content

Commit 47f87fa

Browse files
committed
Spec compliant @skip/@include. Follow up to #335
1 parent 9e5d959 commit 47f87fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/execution/execute.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ function collectFields(
409409
visitedFragmentNames[fragName] = true;
410410
const fragment = exeContext.fragments[fragName];
411411
if (!fragment ||
412-
!shouldIncludeNode(exeContext, fragment.directives) ||
413412
!doesFragmentConditionMatch(exeContext, fragment, runtimeType)) {
414413
continue;
415414
}
@@ -444,7 +443,7 @@ function shouldIncludeNode(
444443
skipAST.arguments,
445444
exeContext.variableValues
446445
);
447-
if (skipIf) {
446+
if (skipIf === true) {
448447
return false;
449448
}
450449
}
@@ -459,7 +458,9 @@ function shouldIncludeNode(
459458
includeAST.arguments,
460459
exeContext.variableValues
461460
);
462-
return Boolean(includeIf);
461+
if (includeIf === false) {
462+
return false;
463+
}
463464
}
464465

465466
return true;

0 commit comments

Comments
 (0)