@@ -620,14 +620,7 @@ export class GraphQLScalarType {
620620 }
621621 }
622622
623- toConfig(): {|
624- ...GraphQLScalarTypeConfig<mixed, mixed>,
625- serialize: GraphQLScalarSerializer<mixed>,
626- parseValue: GraphQLScalarValueParser<mixed>,
627- parseLiteral: GraphQLScalarLiteralParser<mixed>,
628- extensions: ?ReadOnlyObjMap<mixed>,
629- extensionASTNodes: $ReadOnlyArray<ScalarTypeExtensionNode>,
630- |} {
623+ toConfig(): GraphQLScalarTypeNormalizedConfig {
631624 return {
632625 name: this.name,
633626 description: this.description,
@@ -686,6 +679,15 @@ export type GraphQLScalarTypeConfig<TInternal, TExternal> = {|
686679 extensionASTNodes?: ?$ReadOnlyArray<ScalarTypeExtensionNode>,
687680|};
688681
682+ type GraphQLScalarTypeNormalizedConfig = {|
683+ ...GraphQLScalarTypeConfig<mixed, mixed>,
684+ serialize: GraphQLScalarSerializer<mixed>,
685+ parseValue: GraphQLScalarValueParser<mixed>,
686+ parseLiteral: GraphQLScalarLiteralParser<mixed>,
687+ extensions: ?ReadOnlyObjMap<mixed>,
688+ extensionASTNodes: $ReadOnlyArray<ScalarTypeExtensionNode>,
689+ |};
690+
689691/**
690692 * Object Type Definition
691693 *
@@ -766,13 +768,7 @@ export class GraphQLObjectType {
766768 return this . _interfaces ;
767769 }
768770
769- toConfig ( ) : { |
770- ...GraphQLObjectTypeConfig < any , any > ,
771- interfaces : Array < GraphQLInterfaceType > ,
772- fields : GraphQLFieldConfigMap < any , any > ,
773- extensions : ?ReadOnlyObjMap < mixed > ,
774- extensionASTNodes : $ReadOnlyArray < ObjectTypeExtensionNode > ,
775- | } {
771+ toConfig ( ) : GraphQLObjectTypeNormalizedConfig {
776772 return {
777773 name : this . name ,
778774 description : this . description ,
@@ -924,6 +920,14 @@ export type GraphQLObjectTypeConfig<TSource, TContext> = {|
924920 extensionASTNodes ?: ?$ReadOnlyArray < ObjectTypeExtensionNode > ,
925921| } ;
926922
923+ type GraphQLObjectTypeNormalizedConfig = { |
924+ ...GraphQLObjectTypeConfig < any , any> ,
925+ interfaces : Array < GraphQLInterfaceType > ,
926+ fields : GraphQLFieldConfigMap < any , any> ,
927+ extensions : ?ReadOnlyObjMap < mixed > ,
928+ extensionASTNodes : $ReadOnlyArray < ObjectTypeExtensionNode > ,
929+ | } ;
930+
927931/**
928932 * Note: returning GraphQLObjectType is deprecated and will be removed in v16.0.0
929933 */
@@ -1092,13 +1096,7 @@ export class GraphQLInterfaceType {
10921096 return this . _interfaces ;
10931097 }
10941098
1095- toConfig ( ) : { |
1096- ...GraphQLInterfaceTypeConfig < any , any > ,
1097- interfaces : Array < GraphQLInterfaceType > ,
1098- fields : GraphQLFieldConfigMap < any , any > ,
1099- extensions : ?ReadOnlyObjMap < mixed > ,
1100- extensionASTNodes : $ReadOnlyArray < InterfaceTypeExtensionNode > ,
1101- | } {
1099+ toConfig ( ) : GraphQLInterfaceTypeNormalizedConfig {
11021100 return {
11031101 name : this . name ,
11041102 description : this . description ,
@@ -1144,6 +1142,14 @@ export type GraphQLInterfaceTypeConfig<TSource, TContext> = {|
11441142 extensionASTNodes ?: ?$ReadOnlyArray < InterfaceTypeExtensionNode > ,
11451143| } ;
11461144
1145+ export type GraphQLInterfaceTypeNormalizedConfig = { |
1146+ ...GraphQLInterfaceTypeConfig < any , any> ,
1147+ interfaces : Array < GraphQLInterfaceType > ,
1148+ fields : GraphQLFieldConfigMap < any , any> ,
1149+ extensions : ?ReadOnlyObjMap < mixed > ,
1150+ extensionASTNodes : $ReadOnlyArray < InterfaceTypeExtensionNode > ,
1151+ | } ;
1152+
11471153/**
11481154 * Union Type Definition
11491155 *
@@ -1201,12 +1207,7 @@ export class GraphQLUnionType {
12011207 return this . _types ;
12021208 }
12031209
1204- toConfig ( ) : { |
1205- ...GraphQLUnionTypeConfig < any , any > ,
1206- types : Array < GraphQLObjectType > ,
1207- extensions : ?ReadOnlyObjMap < mixed > ,
1208- extensionASTNodes : $ReadOnlyArray < UnionTypeExtensionNode > ,
1209- | } {
1210+ toConfig ( ) : GraphQLUnionTypeNormalizedConfig {
12101211 return {
12111212 name : this . name ,
12121213 description : this . description ,
@@ -1261,6 +1262,13 @@ export type GraphQLUnionTypeConfig<TSource, TContext> = {|
12611262 extensionASTNodes ?: ?$ReadOnlyArray < UnionTypeExtensionNode > ,
12621263| } ;
12631264
1265+ type GraphQLUnionTypeNormalizedConfig = { |
1266+ ...GraphQLUnionTypeConfig < any , any> ,
1267+ types : Array < GraphQLObjectType > ,
1268+ extensions : ?ReadOnlyObjMap < mixed > ,
1269+ extensionASTNodes : $ReadOnlyArray < UnionTypeExtensionNode > ,
1270+ | } ;
1271+
12641272/**
12651273 * Enum Type Definition
12661274 *
@@ -1369,11 +1377,7 @@ export class GraphQLEnumType /* <T> */ {
13691377 return enumValue . value ;
13701378 }
13711379
1372- toConfig ( ) : { |
1373- ...GraphQLEnumTypeConfig ,
1374- extensions : ?ReadOnlyObjMap < mixed > ,
1375- extensionASTNodes : $ReadOnlyArray < EnumTypeExtensionNode > ,
1376- | } {
1380+ toConfig ( ) : GraphQLEnumTypeNormalizedConfig {
13771381 const values = keyValMap (
13781382 this . getValues ( ) ,
13791383 ( value ) => value . name ,
@@ -1462,6 +1466,12 @@ export type GraphQLEnumTypeConfig /* <T> */ = {|
14621466 extensionASTNodes ?: ?$ReadOnlyArray < EnumTypeExtensionNode > ,
14631467| } ;
14641468
1469+ type GraphQLEnumTypeNormalizedConfig = { |
1470+ ...GraphQLEnumTypeConfig ,
1471+ extensions : ?ReadOnlyObjMap < mixed > ,
1472+ extensionASTNodes : $ReadOnlyArray < EnumTypeExtensionNode > ,
1473+ | } ;
1474+
14651475export type GraphQLEnumValueConfigMap /* <T> */ = ObjMap < GraphQLEnumValueConfig /* <T> */ > ;
14661476
14671477export type GraphQLEnumValueConfig /* <T> */ = { |
@@ -1531,12 +1541,7 @@ export class GraphQLInputObjectType {
15311541 return this . _fields ;
15321542 }
15331543
1534- toConfig ( ) : { |
1535- ...GraphQLInputObjectTypeConfig ,
1536- fields : GraphQLInputFieldConfigMap ,
1537- extensions : ?ReadOnlyObjMap < mixed > ,
1538- extensionASTNodes : $ReadOnlyArray < InputObjectTypeExtensionNode > ,
1539- | } {
1544+ toConfig ( ) : GraphQLInputObjectTypeNormalizedConfig {
15401545 const fields = mapValue ( this . getFields ( ) , ( field ) => ( {
15411546 description : field . description ,
15421547 type : field . type ,
@@ -1607,6 +1612,13 @@ export type GraphQLInputObjectTypeConfig = {|
16071612 extensionASTNodes ?: ?$ReadOnlyArray < InputObjectTypeExtensionNode > ,
16081613| } ;
16091614
1615+ type GraphQLInputObjectTypeNormalizedConfig = { |
1616+ ...GraphQLInputObjectTypeConfig ,
1617+ fields : GraphQLInputFieldConfigMap ,
1618+ extensions : ?ReadOnlyObjMap < mixed > ,
1619+ extensionASTNodes : $ReadOnlyArray < InputObjectTypeExtensionNode > ,
1620+ | } ;
1621+
16101622export type GraphQLInputFieldConfig = { |
16111623 description ?: ?string ,
16121624 type : GraphQLInputType ,
0 commit comments