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 @@ -138,6 +138,8 @@ export {
138138 GraphQLNullableType ,
139139 GraphQLNamedType ,
140140 Thunk ,
141+ GraphQLNamedInputType ,
142+ GraphQLNamedOutputType ,
141143 GraphQLSchemaConfig ,
142144 GraphQLSchemaExtensions ,
143145 GraphQLDirectiveConfig ,
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ export type {
137137 GraphQLNullableType ,
138138 GraphQLNamedType ,
139139 Thunk ,
140+ GraphQLNamedInputType ,
141+ GraphQLNamedOutputType ,
140142 GraphQLSchemaConfig ,
141143 GraphQLDirectiveConfig ,
142144 GraphQLArgument ,
Original file line number Diff line number Diff line change @@ -254,19 +254,27 @@ export function getNullableType<T extends GraphQLNullableType>(
254254/**
255255 * These named types do not include modifiers like List or NonNull.
256256 */
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 =
258265 | GraphQLScalarType
259266 | GraphQLObjectType
260267 | GraphQLInterfaceType
261268 | GraphQLUnionType
262- | GraphQLEnumType
263- | GraphQLInputObjectType ;
269+ | GraphQLEnumType ;
264270
265271export function isNamedType ( type : any ) : type is GraphQLNamedType ;
266272
267273export function assertNamedType ( type : any ) : GraphQLNamedType ;
268274
269275export function getNamedType ( type : undefined ) : undefined ;
276+ export function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
277+ export function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
270278export function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
271279
272280/**
Original file line number Diff line number Diff line change @@ -493,13 +493,19 @@ export function getNullableType(type) {
493493/**
494494 * These named types do not include modifiers like List or NonNull.
495495 */
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 =
497504 | GraphQLScalarType
498505 | GraphQLObjectType
499506 | GraphQLInterfaceType
500507 | GraphQLUnionType
501- | GraphQLEnumType
502- | GraphQLInputObjectType ;
508+ | GraphQLEnumType ;
503509
504510export function isNamedType ( type : mixed ) : boolean % checks {
505511 return (
@@ -521,6 +527,8 @@ export function assertNamedType(type: mixed): GraphQLNamedType {
521527
522528/* eslint-disable no-redeclare */
523529declare function getNamedType ( type : void | null ) : void ;
530+ declare function getNamedType ( type : GraphQLInputType ) : GraphQLNamedInputType ;
531+ declare function getNamedType ( type : GraphQLOutputType ) : GraphQLNamedOutputType ;
524532declare function getNamedType ( type : GraphQLType ) : GraphQLNamedType ;
525533export function getNamedType ( type ) {
526534 /* eslint-enable no-redeclare */
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ export {
7474 GraphQLNullableType ,
7575 GraphQLNamedType ,
7676 Thunk ,
77+ GraphQLNamedInputType ,
78+ GraphQLNamedOutputType ,
7779 GraphQLArgument ,
7880 GraphQLArgumentConfig ,
7981 GraphQLArgumentExtensions ,
Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ export type {
129129 GraphQLNullableType ,
130130 GraphQLNamedType ,
131131 Thunk ,
132+ GraphQLNamedInputType ,
133+ GraphQLNamedOutputType ,
132134 GraphQLArgument ,
133135 GraphQLArgumentConfig ,
134136 GraphQLEnumTypeConfig ,
You can’t perform that action at this time.
0 commit comments