@@ -529,6 +529,11 @@ newDeferUsages, path, deferMap, incrementalDataRecord):
529529- Return {newDeferredFragmentRecords}, {newDeferMap}, and
530530 {newDeferredGroupedFieldSetRecords}.
531531
532+ IntroduceSubsequentResult(publisherRecord, subsequentResult):
533+
534+ - Let {pending} be the corresponding entry on {publisherRecord}.
535+ - Add {subsequentResult} to {pending}.
536+
532537GetParentTarget(deferUsage, deferMap):
533538
534539- Let {ancestors} be the corresponding entry on {deferUsage}.
@@ -615,6 +620,13 @@ CompleteEmptyDeferredFragmentRecords(publisherRecord, deferredFragmentRecord):
615620 - Set {isCompleted} on {deferredFragmentRecord} to {true}.
616621 - Call {ReleaseSubsequentResult(publisherRecord, deferredFragmentRecord)}.
617622
623+ ReleaseSubsequentResult(publisherRecord, subsequentResult):
624+
625+ - Let {released} and {pending} be the corresponding entries on
626+ {publisherRecord}.
627+ - If {subsequentResult} is not within {pending}, return.
628+ - Add {subsequentResult} to {released}.
629+
618630#### Complete Deferred Grouped Field Set Record
619631
620632CompleteDeferredGroupedFieldSet(publisherRecord, deferredGroupedFieldSetRecord,
@@ -669,35 +681,6 @@ MarkErroredStreamItemsRecord(publisherRecord, streamItemsRecord, errors):
669681- Set {isCompleted} on {streamItemsRecord} to {true}.
670682- Call {ReleaseSubsequentResult(publisherRecord, streamItemsRecord)}.
671683
672- #### Introduce Subsequent Result
673-
674- IntroduceSubsequentResult(publisherRecord, subsequentResult):
675-
676- - Let {pending} be the corresponding entry on {publisherRecord}.
677- - Add {subsequentResult} to {pending}.
678-
679- #### Release Subsequent Result
680-
681- ReleaseSubsequentResult(publisherRecord, subsequentResult):
682-
683- - Let {released} and {pending} be the corresponding entries on
684- {publisherRecord}.
685- - If {subsequentResult} is not within {pending}, return.
686- - Add {subsequentResult} to {released}.
687-
688- #### Publish Subsequent Result
689-
690- PublishSubsequentResult(publisherRecord, subsequentResult):
691-
692- - Let {isCompleted} be the corresponding entry on {subsequentResult}.
693- - If {isCompleted} is {true}:
694- - Let {released}, {pending}, and {signal} be the corresponding entries on
695- {publisherRecord}.
696- - Add {subsequentResult} to both {released} and {pending}.
697- - Trigger {signal}.
698- - Otherwise:
699- - Call {IntroduceSubsequentResult(publisherRecord, subsequentResult)}.
700-
701684#### Yield Results
702685
703686If an operation contains subsequent result records resulting from ` @stream ` or
@@ -812,6 +795,17 @@ GenerateSubsequentResponse(publisherRecord, current):
812795 - Set the corresponding entry on {subsequentResult} to {completed}.
813796- Return {subsequentResult}.
814797
798+ PublishSubsequentResult(publisherRecord, subsequentResult):
799+
800+ - Let {isCompleted} be the corresponding entry on {subsequentResult}.
801+ - If {isCompleted} is {true}:
802+ - Let {released}, {pending}, and {signal} be the corresponding entries on
803+ {publisherRecord}.
804+ - Add {subsequentResult} to both {released} and {pending}.
805+ - Trigger {signal}.
806+ - Otherwise:
807+ - Call {IntroduceSubsequentResult(publisherRecord, subsequentResult)}.
808+
815809PendingRecordsToResults(records):
816810
817811- Initialize {pendingResults} to an empty list.
0 commit comments