File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,6 @@ export const StarWarsSchema: GraphQLSchema = new GraphQLSchema({
314
314
export const StarWarsSchemaDeferStreamEnabled = new GraphQLSchema ( {
315
315
query : queryType ,
316
316
types : [ humanType , droidType ] ,
317
- experimentalDeferFragmentSpreads : true ,
317
+ experimentalDefer : true ,
318
318
experimentalStream : true ,
319
319
} ) ;
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ export function collectFields(
550
550
continue ;
551
551
}
552
552
553
- const patchLabel = exeContext . schema . __experimentalDeferFragmentSpreads
553
+ const patchLabel = exeContext . schema . __experimentalDefer
554
554
? getDeferredNodeLabel ( exeContext , selection )
555
555
: '' ;
556
556
@@ -586,7 +586,7 @@ export function collectFields(
586
586
continue ;
587
587
}
588
588
589
- const patchLabel = exeContext . schema . __experimentalDeferFragmentSpreads
589
+ const patchLabel = exeContext . schema . __experimentalDefer
590
590
? getDeferredNodeLabel ( exeContext , selection )
591
591
: '' ;
592
592
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ export class GraphQLSchema {
142
142
// Used as a cache for validateSchema().
143
143
__validationErrors : ?$ReadOnlyArray < GraphQLError > ;
144
144
// Referenced by execute()
145
- __experimentalDeferFragmentSpreads : boolean ;
145
+ __experimentalDefer : boolean ;
146
146
__experimentalStream : boolean ;
147
147
148
148
constructor ( config : $ReadOnly < GraphQLSchemaConfig > ) : void {
@@ -184,11 +184,12 @@ export class GraphQLSchema {
184
184
collectReferencedTypes ( type , allReferencedTypes ) ;
185
185
}
186
186
}
187
- if ( config . experimentalDeferFragmentSpreads ) {
188
- this . __experimentalDeferFragmentSpreads = true ;
187
+
188
+ if ( config . __experimentalDefer ) {
189
+ this . ____experimentalDefer = true ;
189
190
this . _directives = [ ] . concat ( this . _directives , [ GraphQLDeferDirective ] ) ;
190
191
} else {
191
- this . __experimentalDeferFragmentSpreads = false ;
192
+ this . ____experimentalDefer = false ;
192
193
}
193
194
194
195
if ( config . experimentalStream ) {
@@ -394,7 +395,7 @@ export type GraphQLSchemaValidationOptions = {|
394
395
*
395
396
* Default: false
396
397
*/
397
- experimentalDeferFragmentSpreads ? : boolean ,
398
+ experimentalDefer ? : boolean ,
398
399
399
400
/**
400
401
*
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export function buildASTSchema(
109
109
110
110
if (
111
111
options &&
112
- options . experimentalDeferFragmentSpreads &&
112
+ options . experimentalDefer &&
113
113
! directives . some ( directive => directive . name === 'defer' )
114
114
) {
115
115
directives . push ( GraphQLDeferDirective ) ;
You can’t perform that action at this time.
0 commit comments