Closed
Description
Specifying nullable connection fields, like this, works OK:
connection(first: Int, after: String): EntityConnection @connection(for: "Entity")
However, making EntityConnection
non-null
connection(first: Int, after: String): EntityConnection! @connection(for: "Entity")
results in
java.lang.ClassCastException: class graphql.language.NonNullType cannot be cast to class graphql.language.TypeName (graphql.language.NonNullType and graphql.language.TypeName are in unnamed module of loader 'app')
at com.coxautodev.graphql.tools.relay.RelayConnectionFactory$DirectiveWithField.getTypeName(RelayConnectionFactory.kt:89)
at com.coxautodev.graphql.tools.relay.RelayConnectionFactory.createDefinitions(RelayConnectionFactory.kt:50)
It doesn't appear that Relay spec requires connections, so this is probably a bug.