Skip to content

Commit c680b6c

Browse files
Remove Flow workaround in buildASTSchema (#1697)
1 parent 784e71b commit c680b6c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/utilities/buildASTSchema.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,10 @@ export class ASTDefinitionBuilder {
226226

227227
getWrappedType(node: TypeNode): GraphQLType {
228228
if (node.kind === Kind.LIST_TYPE) {
229-
return GraphQLList(this.getWrappedType(node.type));
229+
return new GraphQLList(this.getWrappedType(node.type));
230230
}
231231
if (node.kind === Kind.NON_NULL_TYPE) {
232-
return GraphQLNonNull(
233-
// Note: GraphQLNonNull constructor validates this type
234-
(this.getWrappedType(node.type): any),
235-
);
232+
return new GraphQLNonNull(this.getWrappedType(node.type));
236233
}
237234
return this.getNamedType(node);
238235
}

0 commit comments

Comments
 (0)