Skip to content

Commit a6f7137

Browse files
committed
publisher: remove extra ticks
use children array instead of promises to manage hierarchy
1 parent 3a18042 commit a6f7137

File tree

3 files changed

+135
-115
lines changed

3 files changed

+135
-115
lines changed

src/execution/__tests__/stream-test.ts

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,6 @@ describe('Execute: stream directive', () => {
11741174
],
11751175
},
11761176
],
1177-
hasNext: true,
1178-
},
1179-
{
11801177
hasNext: false,
11811178
},
11821179
]);
@@ -1200,25 +1197,19 @@ describe('Execute: stream directive', () => {
12001197
} /* c8 ignore stop */,
12011198
},
12021199
});
1203-
expectJSON(result).toDeepEqual([
1204-
{
1205-
errors: [
1206-
{
1207-
message:
1208-
'Cannot return null for non-nullable field NestedObject.nonNullScalarField.',
1209-
locations: [{ line: 4, column: 11 }],
1210-
path: ['nestedObject', 'nonNullScalarField'],
1211-
},
1212-
],
1213-
data: {
1214-
nestedObject: null,
1200+
expectJSON(result).toDeepEqual({
1201+
errors: [
1202+
{
1203+
message:
1204+
'Cannot return null for non-nullable field NestedObject.nonNullScalarField.',
1205+
locations: [{ line: 4, column: 11 }],
1206+
path: ['nestedObject', 'nonNullScalarField'],
12151207
},
1216-
hasNext: true,
1217-
},
1218-
{
1219-
hasNext: false,
1208+
],
1209+
data: {
1210+
nestedObject: null,
12201211
},
1221-
]);
1212+
});
12221213
});
12231214
it('Filters payloads that are nulled by a later synchronous error', async () => {
12241215
const document = parse(`
@@ -1286,10 +1277,6 @@ describe('Execute: stream directive', () => {
12861277
},
12871278
{
12881279
incremental: [
1289-
{
1290-
items: [{ name: 'Luke' }],
1291-
path: ['nestedObject', 'nestedFriendList', 0],
1292-
},
12931280
{
12941281
data: { scalarField: null },
12951282
path: ['otherNestedObject'],
@@ -1301,6 +1288,10 @@ describe('Execute: stream directive', () => {
13011288
},
13021289
],
13031290
},
1291+
{
1292+
items: [{ name: 'Luke' }],
1293+
path: ['nestedObject', 'nestedFriendList', 0],
1294+
},
13041295
],
13051296
hasNext: true,
13061297
},
@@ -1362,9 +1353,6 @@ describe('Execute: stream directive', () => {
13621353
],
13631354
},
13641355
],
1365-
hasNext: true,
1366-
},
1367-
{
13681356
hasNext: false,
13691357
},
13701358
]);

0 commit comments

Comments
 (0)