Skip to content

Commit 352d464

Browse files
rename feature flag to experimentalDefer
1 parent 0147e0d commit 352d464

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class GraphQLSchema {
135135
// Used as a cache for validateSchema().
136136
__validationErrors: ?$ReadOnlyArray<GraphQLError>;
137137
// Referenced by execute()
138-
__experimentalDeferFragmentSpreads: boolean;
138+
__experimentalDefer: boolean;
139139
__experimentalStream: boolean;
140140

141141
constructor(config: $ReadOnly<GraphQLSchemaConfig>): void {
@@ -164,8 +164,7 @@ export class GraphQLSchema {
164164
this.astNode = config.astNode;
165165
this.extensionASTNodes = config.extensionASTNodes;
166166

167-
this.__experimentalDeferFragmentSpreads =
168-
config.experimentalDeferFragmentSpreads || false;
167+
this.__experimentalDefer = config.experimentalDefer || false;
169168
this.__experimentalStream = config.experimentalStream || false;
170169
this._queryType = config.query;
171170
this._mutationType = config.mutation;
@@ -321,7 +320,7 @@ export type GraphQLSchemaValidationOptions = {|
321320
*
322321
* Default: false
323322
*/
324-
experimentalDeferFragmentSpreads?: boolean,
323+
experimentalDefer?: boolean,
325324

326325
/**
327326
*

0 commit comments

Comments
 (0)