@@ -105,6 +105,11 @@ const collectSubfields = memoize3(
105
105
* 3) inline fragment "spreads" e.g. `...on Type { a }`
106
106
*/
107
107
108
+ type IncrementalPublisher = Publisher <
109
+ IncrementalDataRecord ,
110
+ SubsequentIncrementalExecutionResult
111
+ > ;
112
+
108
113
/**
109
114
* Data that must be available at all points during query execution.
110
115
*
@@ -122,10 +127,7 @@ export interface ExecutionContext {
122
127
typeResolver : GraphQLTypeResolver < any , any > ;
123
128
subscribeFieldResolver : GraphQLFieldResolver < any , any > ;
124
129
errors : Array < GraphQLError > ;
125
- publisher : Publisher <
126
- IncrementalDataRecord ,
127
- SubsequentIncrementalExecutionResult
128
- > ;
130
+ publisher : IncrementalPublisher ;
129
131
}
130
132
131
133
/**
@@ -2169,10 +2171,7 @@ function matchesPath(
2169
2171
2170
2172
function getIncrementalResult (
2171
2173
completedRecords : ReadonlySet < IncrementalDataRecord > ,
2172
- publisher : Publisher <
2173
- IncrementalDataRecord ,
2174
- SubsequentIncrementalExecutionResult
2175
- > ,
2174
+ publisher : IncrementalPublisher ,
2176
2175
) : SubsequentIncrementalExecutionResult | undefined {
2177
2176
const incrementalResults : Array < IncrementalResult > = [ ] ;
2178
2177
let encounteredCompletedAsyncIterator = false ;
@@ -2235,19 +2234,13 @@ class DeferredFragmentRecord {
2235
2234
parentContext : IncrementalDataRecord | undefined ;
2236
2235
children : Set < IncrementalDataRecord > ;
2237
2236
isCompleted : boolean ;
2238
- _publisher : Publisher <
2239
- IncrementalDataRecord ,
2240
- SubsequentIncrementalExecutionResult
2241
- > ;
2237
+ _publisher : IncrementalPublisher ;
2242
2238
2243
2239
constructor ( opts : {
2244
2240
label : string | undefined ;
2245
2241
path : Path | undefined ;
2246
2242
parentContext : IncrementalDataRecord | undefined ;
2247
- publisher : Publisher <
2248
- IncrementalDataRecord ,
2249
- SubsequentIncrementalExecutionResult
2250
- > ;
2243
+ publisher : IncrementalPublisher ;
2251
2244
} ) {
2252
2245
this . type = 'defer' ;
2253
2246
this . label = opts . label ;
@@ -2291,20 +2284,14 @@ class StreamItemsRecord {
2291
2284
asyncIterator : AsyncIterator < unknown > | undefined ;
2292
2285
isCompletedAsyncIterator ?: boolean ;
2293
2286
isCompleted : boolean ;
2294
- _publisher : Publisher <
2295
- IncrementalDataRecord ,
2296
- SubsequentIncrementalExecutionResult
2297
- > ;
2287
+ _publisher : IncrementalPublisher ;
2298
2288
2299
2289
constructor ( opts : {
2300
2290
label : string | undefined ;
2301
2291
path : Path | undefined ;
2302
2292
asyncIterator ?: AsyncIterator < unknown > ;
2303
2293
parentContext : IncrementalDataRecord | undefined ;
2304
- publisher : Publisher <
2305
- IncrementalDataRecord ,
2306
- SubsequentIncrementalExecutionResult
2307
- > ;
2294
+ publisher : IncrementalPublisher ;
2308
2295
} ) {
2309
2296
this . type = 'stream' ;
2310
2297
this . items = null ;
0 commit comments