Skip to content

Commit 6fac3b5

Browse files
committed
SemanticNonNull halts null propagation
1 parent 07e4646 commit 6fac3b5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/execution/__tests__/executor-test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,14 +1425,17 @@ describe('Execute: Handles Semantic Nullability', () => {
14251425
});
14261426

14271427
it('SemanticNonNull halts null propagation', async () => {
1428+
const deepData = {
1429+
f: () => null
1430+
};
1431+
14281432
const data = {
14291433
a: () => 'Apple',
14301434
b: () => null,
14311435
c: () => 'Cookie',
1432-
d: () => {
1433-
f: () => null
1434-
}
1436+
d: () => deepData
14351437
};
1438+
14361439

14371440
const document = parse(`
14381441
query {

src/execution/execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ function completeValue(
651651
throw result;
652652
}
653653

654-
console.log("anything", path);
654+
console.log("anything", path, result);
655655

656656
// If field type is NonNull, complete for inner type, and throw field error
657657
// if result is null.

0 commit comments

Comments
 (0)