Skip to content

Commit 7f8e2f0

Browse files
committed
rename feature flag to experimentalDefer
# Conflicts: # src/type/schema.js
1 parent 7efad59 commit 7f8e2f0

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
@@ -309,6 +309,6 @@ export const StarWarsSchema = new GraphQLSchema({
309309
export const StarWarsSchemaDeferStreamEnabled = new GraphQLSchema({
310310
query: queryType,
311311
types: [humanType, droidType],
312-
experimentalDeferFragmentSpreads: true,
312+
experimentalDefer: true,
313313
experimentalStream: true,
314314
});

src/execution/execute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ export function collectFields(
546546
continue;
547547
}
548548

549-
const patchLabel = exeContext.schema.__experimentalDeferFragmentSpreads
549+
const patchLabel = exeContext.schema.__experimentalDefer
550550
? getDeferredNodeLabel(exeContext, selection)
551551
: '';
552552

@@ -582,7 +582,7 @@ export function collectFields(
582582
continue;
583583
}
584584

585-
const patchLabel = exeContext.schema.__experimentalDeferFragmentSpreads
585+
const patchLabel = exeContext.schema.__experimentalDefer
586586
? getDeferredNodeLabel(exeContext, selection)
587587
: '';
588588

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) {
@@ -335,7 +335,7 @@ export type GraphQLSchemaValidationOptions = {|
335335
*
336336
* Default: false
337337
*/
338-
experimentalDeferFragmentSpreads?: boolean,
338+
experimentalDefer?: boolean,
339339

340340
/**
341341
*

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)