@@ -133,8 +133,6 @@ export class GraphQLSchema {
133
133
_possibleTypeMap : ObjMap < ObjMap < boolean >> ;
134
134
// Used as a cache for validateSchema().
135
135
__validationErrors : ?$ReadOnlyArray < GraphQLError > ;
136
- // Referenced by validateSchema().
137
- __allowedLegacyNames : $ReadOnlyArray < string > ;
138
136
139
137
constructor ( config : GraphQLSchemaConfig ) : void {
140
138
// If this schema was built from a source known to be valid, then it may be
@@ -156,18 +154,12 @@ export class GraphQLSchema {
156
154
'"directives" must be Array if provided but got: ' +
157
155
`${ inspect ( config . directives ) } .` ,
158
156
) ;
159
- devAssert (
160
- ! config . allowedLegacyNames || Array . isArray ( config . allowedLegacyNames ) ,
161
- '"allowedLegacyNames" must be Array if provided but got: ' +
162
- `${ inspect ( config . allowedLegacyNames ) } .` ,
163
- ) ;
164
157
}
165
158
166
159
this . extensions = config . extensions && toObjMap ( config . extensions ) ;
167
160
this . astNode = config . astNode ;
168
161
this . extensionASTNodes = config . extensionASTNodes ;
169
162
170
- this . __allowedLegacyNames = config . allowedLegacyNames || [ ] ;
171
163
this . _queryType = config . query ;
172
164
this . _mutationType = config . mutation ;
173
165
this . _subscriptionType = config . subscription ;
@@ -273,7 +265,6 @@ export class GraphQLSchema {
273
265
extensions : ?ReadOnlyObjMap < mixed > ,
274
266
extensionASTNodes : $ReadOnlyArray < SchemaExtensionNode > ,
275
267
assumeValid : boolean ,
276
- allowedLegacyNames : $ReadOnlyArray < string > ,
277
268
| } {
278
269
return {
279
270
query : this . getQueryType ( ) ,
@@ -285,7 +276,6 @@ export class GraphQLSchema {
285
276
astNode : this . astNode ,
286
277
extensionASTNodes : this . extensionASTNodes || [ ] ,
287
278
assumeValid : this . __validationErrors !== undefined ,
288
- allowedLegacyNames : this . __allowedLegacyNames ,
289
279
} ;
290
280
}
291
281
}
@@ -304,15 +294,6 @@ export type GraphQLSchemaValidationOptions = {|
304
294
* Default: false
305
295
*/
306
296
assumeValid ?: boolean ,
307
-
308
- /**
309
- * If provided, the schema will consider fields or types with names included
310
- * in this list valid, even if they do not adhere to the specification's
311
- * schema validation rules.
312
- *
313
- * This option is provided to ease adoption and will be removed in v15.
314
- */
315
- allowedLegacyNames ?: ?$ReadOnlyArray < string > ,
316
297
| } ;
317
298
318
299
export type GraphQLSchemaConfig = { |
0 commit comments