Closed mariogarcia closed 7 years ago
I've found inconsistencies in object type null/list calls. It turns out that a scalar type is both input and output type, and the same goes for nonNull/list types. So basically I only need:
GraphQLNonNull nonNull(GraphQLType type)
and GraphQLList list(GraphQLType type)
. I could add them using @Delegate
transform or a trait
(TypeRestrictionsAware?) in order not to repeat code inside the buildersInputTypeBuilder.FieldBuilder field(String name, GraphQLInputType inputType)
ObjectTypeBuilder.FieldBuilder field(String name, GraphQLOutputType outputType)
When trying to expose the following input type:
It gives me the following stacktrace:
It seems that, because fields in
DSL.input
only expect to receive or aGraphQLInputType
or aGraphQLScalarType
they doesn't know anything about aGraphQLNonNull
type.Maybe it's necessary to overwrite
field
with the following version: