@@ -1857,7 +1857,7 @@ function executeStreamField(
1857
1857
label ?: string ,
1858
1858
parentContext ?: AsyncPayloadRecord ,
1859
1859
) : AsyncPayloadRecord {
1860
- const asyncPayloadRecord = new StreamRecord ( {
1860
+ const asyncPayloadRecord = new StreamItemsRecord ( {
1861
1861
label,
1862
1862
path : itemPath ,
1863
1863
parentContext,
@@ -1953,7 +1953,7 @@ async function executeStreamAsyncIteratorItem(
1953
1953
fieldGroup : FieldGroup ,
1954
1954
info : GraphQLResolveInfo ,
1955
1955
itemType : GraphQLOutputType ,
1956
- asyncPayloadRecord : StreamRecord ,
1956
+ asyncPayloadRecord : StreamItemsRecord ,
1957
1957
itemPath : Path ,
1958
1958
) : Promise < IteratorResult < unknown > > {
1959
1959
let item ;
@@ -2033,7 +2033,7 @@ async function executeStreamAsyncIterator(
2033
2033
// eslint-disable-next-line no-constant-condition
2034
2034
while ( true ) {
2035
2035
const itemPath = addPath ( path , index , undefined ) ;
2036
- const asyncPayloadRecord = new StreamRecord ( {
2036
+ const asyncPayloadRecord = new StreamItemsRecord ( {
2037
2037
label,
2038
2038
path : itemPath ,
2039
2039
parentContext : previousAsyncPayloadRecord ,
@@ -2110,7 +2110,7 @@ function filterSubsequentPayloads(
2110
2110
}
2111
2111
}
2112
2112
// asyncRecord path points to nulled error field
2113
- if ( isStreamPayload ( asyncRecord ) && asyncRecord . asyncIterator ?. return ) {
2113
+ if ( isStreamItemsRecord ( asyncRecord ) && asyncRecord . asyncIterator ?. return ) {
2114
2114
asyncRecord . asyncIterator . return ( ) . catch ( ( ) => {
2115
2115
// ignore error
2116
2116
} ) ;
@@ -2129,7 +2129,7 @@ function getCompletedIncrementalResults(
2129
2129
continue ;
2130
2130
}
2131
2131
exeContext . subsequentPayloads . delete ( asyncPayloadRecord ) ;
2132
- if ( isStreamPayload ( asyncPayloadRecord ) ) {
2132
+ if ( isStreamItemsRecord ( asyncPayloadRecord ) ) {
2133
2133
const items = asyncPayloadRecord . items ;
2134
2134
if ( asyncPayloadRecord . isCompletedAsyncIterator ) {
2135
2135
// async iterable resolver just finished but there may be pending payloads
@@ -2195,7 +2195,7 @@ function yieldSubsequentPayloads(
2195
2195
const promises : Array < Promise < IteratorResult < unknown > > > = [ ] ;
2196
2196
exeContext . subsequentPayloads . forEach ( ( asyncPayloadRecord ) => {
2197
2197
if (
2198
- isStreamPayload ( asyncPayloadRecord ) &&
2198
+ isStreamItemsRecord ( asyncPayloadRecord ) &&
2199
2199
asyncPayloadRecord . asyncIterator ?. return
2200
2200
) {
2201
2201
promises . push ( asyncPayloadRecord . asyncIterator . return ( ) ) ;
@@ -2272,7 +2272,7 @@ class DeferredFragmentRecord {
2272
2272
}
2273
2273
}
2274
2274
2275
- class StreamRecord {
2275
+ class StreamItemsRecord {
2276
2276
type : 'stream' ;
2277
2277
errors : Array < GraphQLError > ;
2278
2278
label : string | undefined ;
@@ -2327,10 +2327,10 @@ class StreamRecord {
2327
2327
}
2328
2328
}
2329
2329
2330
- type AsyncPayloadRecord = DeferredFragmentRecord | StreamRecord ;
2330
+ type AsyncPayloadRecord = DeferredFragmentRecord | StreamItemsRecord ;
2331
2331
2332
- function isStreamPayload (
2332
+ function isStreamItemsRecord (
2333
2333
asyncPayload : AsyncPayloadRecord ,
2334
- ) : asyncPayload is StreamRecord {
2334
+ ) : asyncPayload is StreamItemsRecord {
2335
2335
return asyncPayload . type === 'stream' ;
2336
2336
}
0 commit comments