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 {
137137 GraphQLWrappingType ,
138138 GraphQLNullableType ,
139139 GraphQLNamedType ,
140+ GraphQLNamedInputType ,
141+ GraphQLNamedOutputType ,
140142 ThunkArray ,
141143 ThunkObjMap ,
142144 GraphQLSchemaConfig ,
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ export type {
136136 GraphQLWrappingType ,
137137 GraphQLNullableType ,
138138 GraphQLNamedType ,
139+ GraphQLNamedInputType ,
140+ GraphQLNamedOutputType ,
139141 ThunkArray ,
140142 ThunkObjMap ,
141143 GraphQLSchemaConfig ,
Original file line number Diff line number Diff line change @@ -249,19 +249,27 @@ export function getNullableType<T extends GraphQLNullableType>(
249249/**
250250 * These named types do not include modifiers like List or NonNull.
251251 */
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 =
253260 | GraphQLScalarType
254261 | GraphQLObjectType
255262 | GraphQLInterfaceType
256263 | GraphQLUnionType
257- | GraphQLEnumType
258- | GraphQLInputObjectType ;
264+ | GraphQLEnumType ;
259265
260266export function isNamedType ( type : unknown ) : type is GraphQLNamedType ;
261267
262268export function assertNamedType ( type : unknown ) : GraphQLNamedType ;
263269
264270export function getNamedType ( type : undefined ) : undefined ;
271+ export function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
272+ export function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
265273export function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
266274
267275/**
Original file line number Diff line number Diff line change @@ -467,13 +467,19 @@ export function getNullableType(type) {
467467/**
468468 * These named types do not include modifiers like List or NonNull.
469469 */
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 =
471478 | GraphQLScalarType
472479 | GraphQLObjectType
473480 | GraphQLInterfaceType
474481 | GraphQLUnionType
475- | GraphQLEnumType
476- | GraphQLInputObjectType ;
482+ | GraphQLEnumType ;
477483
478484export function isNamedType ( type : mixed ) : boolean % checks {
479485 return (
@@ -495,6 +501,8 @@ export function assertNamedType(type: mixed): GraphQLNamedType {
495501
496502/* eslint-disable no-redeclare */
497503declare function getNamedType ( type : void | null ) : void ;
504+ declare function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
505+ declare function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
498506declare function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
499507export function getNamedType ( type ) {
500508 /* eslint-enable no-redeclare */
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ export {
7373 GraphQLWrappingType ,
7474 GraphQLNullableType ,
7575 GraphQLNamedType ,
76+ GraphQLNamedInputType ,
77+ GraphQLNamedOutputType ,
7678 ThunkArray ,
7779 ThunkObjMap ,
7880 GraphQLArgument ,
Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ export type {
128128 GraphQLWrappingType ,
129129 GraphQLNullableType ,
130130 GraphQLNamedType ,
131+ GraphQLNamedInputType ,
132+ GraphQLNamedOutputType ,
131133 ThunkArray ,
132134 ThunkObjMap ,
133135 GraphQLArgument ,
You can’t perform that action at this time.
0 commit comments