Skip to content

Commit

Permalink
Spec compliant @skip/@include. Follow up to #335
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron committed Apr 5, 2016
1 parent 9e5d959 commit 47f87fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ function collectFields(
visitedFragmentNames[fragName] = true;
const fragment = exeContext.fragments[fragName];
if (!fragment ||
!shouldIncludeNode(exeContext, fragment.directives) ||
!doesFragmentConditionMatch(exeContext, fragment, runtimeType)) {
continue;
}
Expand Down Expand Up @@ -444,7 +443,7 @@ function shouldIncludeNode(
skipAST.arguments,
exeContext.variableValues
);
if (skipIf) {
if (skipIf === true) {
return false;
}
}
Expand All @@ -459,7 +458,9 @@ function shouldIncludeNode(
includeAST.arguments,
exeContext.variableValues
);
return Boolean(includeIf);
if (includeIf === false) {
return false;
}
}

return true;
Expand Down

0 comments on commit 47f87fa

Please sign in to comment.