File tree 6 files changed +30
-6
lines changed
6 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ export {
138
138
GraphQLNullableType ,
139
139
GraphQLNamedType ,
140
140
Thunk ,
141
+ GraphQLNamedInputType ,
142
+ GraphQLNamedOutputType ,
141
143
GraphQLSchemaConfig ,
142
144
GraphQLSchemaExtensions ,
143
145
GraphQLDirectiveConfig ,
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ export type {
137
137
GraphQLNullableType ,
138
138
GraphQLNamedType ,
139
139
Thunk ,
140
+ GraphQLNamedInputType ,
141
+ GraphQLNamedOutputType ,
140
142
GraphQLSchemaConfig ,
141
143
GraphQLDirectiveConfig ,
142
144
GraphQLArgument ,
Original file line number Diff line number Diff line change @@ -254,19 +254,27 @@ export function getNullableType<T extends GraphQLNullableType>(
254
254
/**
255
255
* These named types do not include modifiers like List or NonNull.
256
256
*/
257
- export type GraphQLNamedType =
257
+ export type GraphQLNamedType = GraphQLNamedInputType | GraphQLNamedOutputType ;
258
+
259
+ export type GraphQLNamedInputType =
260
+ | GraphQLScalarType
261
+ | GraphQLEnumType
262
+ | GraphQLInputObjectType ;
263
+
264
+ export type GraphQLNamedOutputType =
258
265
| GraphQLScalarType
259
266
| GraphQLObjectType
260
267
| GraphQLInterfaceType
261
268
| GraphQLUnionType
262
- | GraphQLEnumType
263
- | GraphQLInputObjectType ;
269
+ | GraphQLEnumType ;
264
270
265
271
export function isNamedType ( type : any ) : type is GraphQLNamedType ;
266
272
267
273
export function assertNamedType ( type : any ) : GraphQLNamedType ;
268
274
269
275
export function getNamedType ( type : undefined ) : undefined ;
276
+ export function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
277
+ export function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
270
278
export function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
271
279
272
280
/**
Original file line number Diff line number Diff line change @@ -493,13 +493,19 @@ export function getNullableType(type) {
493
493
/**
494
494
* These named types do not include modifiers like List or NonNull.
495
495
*/
496
- export type GraphQLNamedType =
496
+ export type GraphQLNamedType = GraphQLNamedInputType | GraphQLNamedOutputType ;
497
+
498
+ export type GraphQLNamedInputType =
499
+ | GraphQLScalarType
500
+ | GraphQLEnumType
501
+ | GraphQLInputObjectType ;
502
+
503
+ export type GraphQLNamedOutputType =
497
504
| GraphQLScalarType
498
505
| GraphQLObjectType
499
506
| GraphQLInterfaceType
500
507
| GraphQLUnionType
501
- | GraphQLEnumType
502
- | GraphQLInputObjectType ;
508
+ | GraphQLEnumType ;
503
509
504
510
export function isNamedType ( type : mixed ) : boolean % checks {
505
511
return (
@@ -521,6 +527,8 @@ export function assertNamedType(type: mixed): GraphQLNamedType {
521
527
522
528
/* eslint-disable no-redeclare */
523
529
declare function getNamedType ( type : void | null ) : void ;
530
+ declare function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
531
+ declare function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
524
532
declare function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
525
533
export function getNamedType ( type ) {
526
534
/* eslint-enable no-redeclare */
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ export {
74
74
GraphQLNullableType ,
75
75
GraphQLNamedType ,
76
76
Thunk ,
77
+ GraphQLNamedInputType ,
78
+ GraphQLNamedOutputType ,
77
79
GraphQLArgument ,
78
80
GraphQLArgumentConfig ,
79
81
GraphQLArgumentExtensions ,
Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ export type {
129
129
GraphQLNullableType ,
130
130
GraphQLNamedType ,
131
131
Thunk ,
132
+ GraphQLNamedInputType ,
133
+ GraphQLNamedOutputType ,
132
134
GraphQLArgument ,
133
135
GraphQLArgumentConfig ,
134
136
GraphQLEnumTypeConfig ,
You can’t perform that action at this time.
0 commit comments