File tree Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ export {
137
137
GraphQLWrappingType ,
138
138
GraphQLNullableType ,
139
139
GraphQLNamedType ,
140
+ GraphQLNamedInputType ,
141
+ GraphQLNamedOutputType ,
140
142
ThunkArray ,
141
143
ThunkObjMap ,
142
144
GraphQLSchemaConfig ,
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ export type {
136
136
GraphQLWrappingType ,
137
137
GraphQLNullableType ,
138
138
GraphQLNamedType ,
139
+ GraphQLNamedInputType ,
140
+ GraphQLNamedOutputType ,
139
141
ThunkArray ,
140
142
ThunkObjMap ,
141
143
GraphQLSchemaConfig ,
Original file line number Diff line number Diff line change @@ -249,19 +249,27 @@ export function getNullableType<T extends GraphQLNullableType>(
249
249
/**
250
250
* These named types do not include modifiers like List or NonNull.
251
251
*/
252
- export type GraphQLNamedType =
252
+ export type GraphQLNamedType = GraphQLNamedInputType | GraphQLNamedOutputType ;
253
+
254
+ export type GraphQLNamedInputType =
255
+ | GraphQLScalarType
256
+ | GraphQLEnumType
257
+ | GraphQLInputObjectType ;
258
+
259
+ export type GraphQLNamedOutputType =
253
260
| GraphQLScalarType
254
261
| GraphQLObjectType
255
262
| GraphQLInterfaceType
256
263
| GraphQLUnionType
257
- | GraphQLEnumType
258
- | GraphQLInputObjectType ;
264
+ | GraphQLEnumType ;
259
265
260
266
export function isNamedType ( type : unknown ) : type is GraphQLNamedType ;
261
267
262
268
export function assertNamedType ( type : unknown ) : GraphQLNamedType ;
263
269
264
270
export function getNamedType ( type : undefined ) : undefined ;
271
+ export function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
272
+ export function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
265
273
export function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
266
274
267
275
/**
Original file line number Diff line number Diff line change @@ -467,13 +467,19 @@ export function getNullableType(type) {
467
467
/**
468
468
* These named types do not include modifiers like List or NonNull.
469
469
*/
470
- export type GraphQLNamedType =
470
+ export type GraphQLNamedType = GraphQLNamedInputType | GraphQLNamedOutputType ;
471
+
472
+ export type GraphQLNamedInputType =
473
+ | GraphQLScalarType
474
+ | GraphQLEnumType
475
+ | GraphQLInputObjectType ;
476
+
477
+ export type GraphQLNamedOutputType =
471
478
| GraphQLScalarType
472
479
| GraphQLObjectType
473
480
| GraphQLInterfaceType
474
481
| GraphQLUnionType
475
- | GraphQLEnumType
476
- | GraphQLInputObjectType ;
482
+ | GraphQLEnumType ;
477
483
478
484
export function isNamedType ( type : mixed ) : boolean % checks {
479
485
return (
@@ -495,6 +501,8 @@ export function assertNamedType(type: mixed): GraphQLNamedType {
495
501
496
502
/* eslint-disable no-redeclare */
497
503
declare function getNamedType ( type : void | null ) : void ;
504
+ declare function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
505
+ declare function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
498
506
declare function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
499
507
export function getNamedType ( type ) {
500
508
/* eslint-enable no-redeclare */
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ export {
73
73
GraphQLWrappingType ,
74
74
GraphQLNullableType ,
75
75
GraphQLNamedType ,
76
+ GraphQLNamedInputType ,
77
+ GraphQLNamedOutputType ,
76
78
ThunkArray ,
77
79
ThunkObjMap ,
78
80
GraphQLArgument ,
Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ export type {
128
128
GraphQLWrappingType ,
129
129
GraphQLNullableType ,
130
130
GraphQLNamedType ,
131
+ GraphQLNamedInputType ,
132
+ GraphQLNamedOutputType ,
131
133
ThunkArray ,
132
134
ThunkObjMap ,
133
135
GraphQLArgument ,
You can’t perform that action at this time.
0 commit comments