@@ -105,6 +105,11 @@ const collectSubfields = memoize3(
105105 * 3) inline fragment "spreads" e.g. `...on Type { a }`
106106 */
107107
108+ type IncrementalPublisher = Publisher <
109+ IncrementalDataRecord ,
110+ SubsequentIncrementalExecutionResult
111+ > ;
112+
108113/**
109114 * Data that must be available at all points during query execution.
110115 *
@@ -122,10 +127,7 @@ export interface ExecutionContext {
122127 typeResolver : GraphQLTypeResolver < any , any > ;
123128 subscribeFieldResolver : GraphQLFieldResolver < any , any > ;
124129 errors : Array < GraphQLError > ;
125- publisher : Publisher <
126- IncrementalDataRecord ,
127- SubsequentIncrementalExecutionResult
128- > ;
130+ publisher : IncrementalPublisher ;
129131}
130132
131133/**
@@ -2169,10 +2171,7 @@ function matchesPath(
21692171
21702172function getIncrementalResult (
21712173 completedRecords : ReadonlySet < IncrementalDataRecord > ,
2172- publisher : Publisher <
2173- IncrementalDataRecord ,
2174- SubsequentIncrementalExecutionResult
2175- > ,
2174+ publisher : IncrementalPublisher ,
21762175) : SubsequentIncrementalExecutionResult | undefined {
21772176 const incrementalResults : Array < IncrementalResult > = [ ] ;
21782177 let encounteredCompletedAsyncIterator = false ;
@@ -2235,19 +2234,13 @@ class DeferredFragmentRecord {
22352234 parentContext : IncrementalDataRecord | undefined ;
22362235 children : Set < IncrementalDataRecord > ;
22372236 isCompleted : boolean ;
2238- _publisher : Publisher <
2239- IncrementalDataRecord ,
2240- SubsequentIncrementalExecutionResult
2241- > ;
2237+ _publisher : IncrementalPublisher ;
22422238
22432239 constructor ( opts : {
22442240 label : string | undefined ;
22452241 path : Path | undefined ;
22462242 parentContext : IncrementalDataRecord | undefined ;
2247- publisher : Publisher <
2248- IncrementalDataRecord ,
2249- SubsequentIncrementalExecutionResult
2250- > ;
2243+ publisher : IncrementalPublisher ;
22512244 } ) {
22522245 this . type = 'defer' ;
22532246 this . label = opts . label ;
@@ -2291,20 +2284,14 @@ class StreamItemsRecord {
22912284 asyncIterator : AsyncIterator < unknown > | undefined ;
22922285 isCompletedAsyncIterator ?: boolean ;
22932286 isCompleted : boolean ;
2294- _publisher : Publisher <
2295- IncrementalDataRecord ,
2296- SubsequentIncrementalExecutionResult
2297- > ;
2287+ _publisher : IncrementalPublisher ;
22982288
22992289 constructor ( opts : {
23002290 label : string | undefined ;
23012291 path : Path | undefined ;
23022292 asyncIterator ?: AsyncIterator < unknown > ;
23032293 parentContext : IncrementalDataRecord | undefined ;
2304- publisher : Publisher <
2305- IncrementalDataRecord ,
2306- SubsequentIncrementalExecutionResult
2307- > ;
2294+ publisher : IncrementalPublisher ;
23082295 } ) {
23092296 this . type = 'stream' ;
23102297 this . items = null ;
0 commit comments