Skip to content

Commit 9df8c01

Browse files
committed
rename feature flag to experimentalDefer
# Conflicts: # src/type/schema.js
1 parent 7639100 commit 9df8c01

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/__tests__/starWarsSchema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,6 @@ export const StarWarsSchema: GraphQLSchema = new GraphQLSchema({
314314
export const StarWarsSchemaDeferStreamEnabled = new GraphQLSchema({
315315
query: queryType,
316316
types: [humanType, droidType],
317-
experimentalDeferFragmentSpreads: true,
317+
experimentalDefer: true,
318318
experimentalStream: true,
319319
});

src/execution/execute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ export function collectFields(
549549
continue;
550550
}
551551

552-
const patchLabel = exeContext.schema.__experimentalDeferFragmentSpreads
552+
const patchLabel = exeContext.schema.__experimentalDefer
553553
? getDeferredNodeLabel(exeContext, selection)
554554
: '';
555555

@@ -585,7 +585,7 @@ export function collectFields(
585585
continue;
586586
}
587587

588-
const patchLabel = exeContext.schema.__experimentalDeferFragmentSpreads
588+
const patchLabel = exeContext.schema.__experimentalDefer
589589
? getDeferredNodeLabel(exeContext, selection)
590590
: '';
591591

src/type/schema.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class GraphQLSchema {
137137
// Used as a cache for validateSchema().
138138
__validationErrors: ?$ReadOnlyArray<GraphQLError>;
139139
// Referenced by execute()
140-
__experimentalDeferFragmentSpreads: boolean;
140+
__experimentalDefer: boolean;
141141
__experimentalStream: boolean;
142142

143143
constructor(config: $ReadOnly<GraphQLSchemaConfig>): void {
@@ -173,11 +173,11 @@ export class GraphQLSchema {
173173
// Provide specified directives (e.g. @include and @skip) by default.
174174
this._directives = config.directives || specifiedDirectives;
175175

176-
if (config.experimentalDeferFragmentSpreads) {
177-
this.__experimentalDeferFragmentSpreads = true;
176+
if (config.__experimentalDefer) {
177+
this.____experimentalDefer = true;
178178
this._directives = [].concat(this._directives, [GraphQLDeferDirective]);
179179
} else {
180-
this.__experimentalDeferFragmentSpreads = false;
180+
this.____experimentalDefer = false;
181181
}
182182

183183
if (config.experimentalStream) {
@@ -336,7 +336,7 @@ export type GraphQLSchemaValidationOptions = {|
336336
*
337337
* Default: false
338338
*/
339-
experimentalDeferFragmentSpreads?: boolean,
339+
experimentalDefer?: boolean,
340340

341341
/**
342342
*

src/utilities/buildASTSchema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export function buildASTSchema(
109109

110110
if (
111111
options &&
112-
options.experimentalDeferFragmentSpreads &&
112+
options.experimentalDefer &&
113113
!directives.some(directive => directive.name === 'defer')
114114
) {
115115
directives.push(GraphQLDeferDirective);

0 commit comments

Comments
 (0)