@@ -50,23 +50,7 @@ import type { GraphQLSchema } from './schema';
50
50
/**
51
51
* These are all of the possible kinds of types.
52
52
*/
53
- export type GraphQLType =
54
- | GraphQLScalarType
55
- | GraphQLObjectType
56
- | GraphQLInterfaceType
57
- | GraphQLUnionType
58
- | GraphQLEnumType
59
- | GraphQLInputObjectType
60
- | GraphQLList < GraphQLType >
61
- | GraphQLNonNull <
62
- | GraphQLScalarType
63
- | GraphQLObjectType
64
- | GraphQLInterfaceType
65
- | GraphQLUnionType
66
- | GraphQLEnumType
67
- | GraphQLInputObjectType
68
- | GraphQLList < GraphQLType >
69
- > ;
53
+ export type GraphQLType = GraphQLInputType | GraphQLOutputType ;
70
54
71
55
export function isType ( type : unknown ) : type is GraphQLType {
72
56
return (
@@ -207,9 +191,7 @@ export function assertNonNullType(type: unknown): GraphQLNonNull<GraphQLType> {
207
191
* These types may be used as input types for arguments and directives.
208
192
*/
209
193
export type GraphQLNullableInputType =
210
- | GraphQLScalarType
211
- | GraphQLEnumType
212
- | GraphQLInputObjectType
194
+ | GraphQLNamedInputType
213
195
| GraphQLList < GraphQLInputType > ;
214
196
215
197
export type GraphQLInputType =
@@ -236,11 +218,7 @@ export function assertInputType(type: unknown): GraphQLInputType {
236
218
* These types may be used as output types as the result of fields.
237
219
*/
238
220
export type GraphQLNullableOutputType =
239
- | GraphQLScalarType
240
- | GraphQLObjectType
241
- | GraphQLInterfaceType
242
- | GraphQLUnionType
243
- | GraphQLEnumType
221
+ | GraphQLNamedOutputType
244
222
| GraphQLList < GraphQLOutputType > ;
245
223
246
224
export type GraphQLOutputType =
@@ -431,13 +409,8 @@ export function assertWrappingType(type: unknown): GraphQLWrappingType {
431
409
* These types can all accept null as a value.
432
410
*/
433
411
export type GraphQLNullableType =
434
- | GraphQLScalarType
435
- | GraphQLObjectType
436
- | GraphQLInterfaceType
437
- | GraphQLUnionType
438
- | GraphQLEnumType
439
- | GraphQLInputObjectType
440
- | GraphQLList < GraphQLType > ;
412
+ | GraphQLNullableInputType
413
+ | GraphQLNullableOutputType ;
441
414
442
415
export function isNullableType ( type : unknown ) : type is GraphQLNullableType {
443
416
return isType ( type ) && ! isNonNullType ( type ) ;
0 commit comments