Skip to content

Commit 96f92f3

Browse files
authored
Improve aggreate NullableType and InputType flow types (#1128)
Mirrors the structure of OutputType flow type, reduces the use of `*`.
1 parent 6104a75 commit 96f92f3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/type/definition.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,17 @@ export function assertType(type: mixed): GraphQLType {
6767
/**
6868
* These types may be used as input types for arguments and directives.
6969
*/
70-
type GraphQLInputType_<T> =
70+
export type GraphQLInputType =
7171
| GraphQLScalarType
7272
| GraphQLEnumType
7373
| GraphQLInputObjectType
74-
| GraphQLList<T>
74+
| GraphQLList<GraphQLInputType>
7575
| GraphQLNonNull<
7676
| GraphQLScalarType
7777
| GraphQLEnumType
7878
| GraphQLInputObjectType
79-
| GraphQLList<T>,
79+
| GraphQLList<GraphQLInputType>,
8080
>;
81-
export type GraphQLInputType = GraphQLInputType_<*>;
8281

8382
export function isInputType(type: ?GraphQLType): boolean %checks {
8483
return (
@@ -200,15 +199,14 @@ export function assertAbstractType(type: ?GraphQLType): GraphQLAbstractType {
200199
/**
201200
* These types can all accept null as a value.
202201
*/
203-
type GraphQLNullableType_<T> =
202+
export type GraphQLNullableType =
204203
| GraphQLScalarType
205204
| GraphQLObjectType
206205
| GraphQLInterfaceType
207206
| GraphQLUnionType
208207
| GraphQLEnumType
209208
| GraphQLInputObjectType
210-
| GraphQLList<T>;
211-
export type GraphQLNullableType = GraphQLNullableType_<*>;
209+
| GraphQLList<*>;
212210

213211
export function getNullableType<T: GraphQLType>(
214212
type: ?T,

0 commit comments

Comments
 (0)