Skip to content

Commit 2b42b91

Browse files
committed
incremental: use invariant for checking id
1 parent 6fa7d55 commit 2b42b91

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/execution/IncrementalPublisher.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,7 @@ class IncrementalPublisher {
300300
): void {
301301
const streamRecord = streamItemsResult.streamRecord;
302302
const id = streamRecord.id;
303-
// TODO: Consider adding invariant or non-null assertion, as this should never happen. Since the stream is converted into a linked list
304-
// for ordering purposes, if an entry errors, additional entries will not be processed.
305-
/* c8 ignore next 3 */
306-
if (id === undefined) {
307-
return;
308-
}
303+
invariant(id !== undefined);
309304
if (streamItemsResult.errors !== undefined) {
310305
context.completed.push({
311306
id,

0 commit comments

Comments
 (0)