@@ -28,6 +28,9 @@ import type {
28
28
InputObjectTypeDefinitionNode ,
29
29
ObjectTypeExtensionNode ,
30
30
InterfaceTypeExtensionNode ,
31
+ UnionTypeExtensionNode ,
32
+ EnumTypeExtensionNode ,
33
+ InputObjectTypeExtensionNode ,
31
34
OperationDefinitionNode ,
32
35
FieldNode ,
33
36
FragmentDefinitionNode ,
@@ -972,7 +975,7 @@ export class GraphQLUnionType {
972
975
name : string ;
973
976
description : ?string ;
974
977
astNode : ?UnionTypeDefinitionNode ;
975
- extensionASTNodes : ?$ReadOnlyArray < ObjectTypeExtensionNode > ;
978
+ extensionASTNodes : ?$ReadOnlyArray < UnionTypeExtensionNode > ;
976
979
resolveType : ?GraphQLTypeResolver < * , * > ;
977
980
978
981
_typeConfig : GraphQLUnionTypeConfig < * , * > ;
@@ -982,6 +985,7 @@ export class GraphQLUnionType {
982
985
this . name = config . name ;
983
986
this . description = config . description ;
984
987
this . astNode = config . astNode ;
988
+ this . extensionASTNodes = config . extensionASTNodes ;
985
989
this . resolveType = config . resolveType ;
986
990
this . _typeConfig = config ;
987
991
invariant ( typeof config . name === 'string' , 'Must provide name.' ) ;
@@ -1032,6 +1036,7 @@ export type GraphQLUnionTypeConfig<TSource, TContext> = {
1032
1036
resolveType ?: ?GraphQLTypeResolver < TSource , TContext> ,
1033
1037
description ?: ?string ,
1034
1038
astNode ?: ?UnionTypeDefinitionNode ,
1039
+ extensionASTNodes ?: ?$ReadOnlyArray < UnionTypeExtensionNode > ,
1035
1040
} ;
1036
1041
1037
1042
/**
@@ -1059,7 +1064,7 @@ export class GraphQLEnumType /* <T> */ {
1059
1064
name : string ;
1060
1065
description : ?string ;
1061
1066
astNode : ?EnumTypeDefinitionNode ;
1062
- extensionASTNodes : ?$ReadOnlyArray < ObjectTypeExtensionNode > ;
1067
+ extensionASTNodes : ?$ReadOnlyArray < EnumTypeExtensionNode > ;
1063
1068
1064
1069
_values : Array < GraphQLEnumValue /* <T> */ > ;
1065
1070
_valueLookup : Map < any /* T */ , GraphQLEnumValue > ;
@@ -1069,6 +1074,7 @@ export class GraphQLEnumType /* <T> */ {
1069
1074
this . name = config . name ;
1070
1075
this . description = config . description ;
1071
1076
this . astNode = config . astNode ;
1077
+ this . extensionASTNodes = config . extensionASTNodes ;
1072
1078
this . _values = defineEnumValues ( this , config . values ) ;
1073
1079
this . _valueLookup = new Map (
1074
1080
this . _values . map ( enumValue => [ enumValue . value , enumValue ] ) ,
@@ -1157,6 +1163,7 @@ export type GraphQLEnumTypeConfig /* <T> */ = {
1157
1163
values : GraphQLEnumValueConfigMap /* <T> */ ,
1158
1164
description ?: ?string ,
1159
1165
astNode ?: ?EnumTypeDefinitionNode ,
1166
+ extensionASTNodes ?: ?$ReadOnlyArray < EnumTypeExtensionNode > ,
1160
1167
} ;
1161
1168
1162
1169
export type GraphQLEnumValueConfigMap /* <T> */ = ObjMap <
@@ -1203,7 +1210,7 @@ export class GraphQLInputObjectType {
1203
1210
name : string ;
1204
1211
description : ?string ;
1205
1212
astNode : ?InputObjectTypeDefinitionNode ;
1206
- extensionASTNodes : ?$ReadOnlyArray < ObjectTypeExtensionNode > ;
1213
+ extensionASTNodes : ?$ReadOnlyArray < InputObjectTypeExtensionNode > ;
1207
1214
1208
1215
_typeConfig : GraphQLInputObjectTypeConfig ;
1209
1216
_fields : GraphQLInputFieldMap ;
@@ -1212,6 +1219,7 @@ export class GraphQLInputObjectType {
1212
1219
this . name = config . name ;
1213
1220
this . description = config . description ;
1214
1221
this . astNode = config . astNode ;
1222
+ this . extensionASTNodes = config . extensionASTNodes ;
1215
1223
this . _typeConfig = config ;
1216
1224
invariant ( typeof config . name === 'string' , 'Must provide name.' ) ;
1217
1225
}
@@ -1257,6 +1265,7 @@ export type GraphQLInputObjectTypeConfig = {
1257
1265
fields : Thunk < GraphQLInputFieldConfigMap > ,
1258
1266
description ?: ?string ,
1259
1267
astNode ?: ?InputObjectTypeDefinitionNode ,
1268
+ extensionASTNodes ?: ?$ReadOnlyArray < InputObjectTypeExtensionNode > ,
1260
1269
} ;
1261
1270
1262
1271
export type GraphQLInputFieldConfig = {
0 commit comments