Closed
Description
ConnectionTypeDefinitionConfigurer
only considers types in the TypeDefinitionRegistry
, type extensions are not considered. For example the following throws an exception on startup((The field type 'CompanyConnection' is not present when resolving type 'Query')):
extend type Query {
company(id: ID!): Company
companies(offset: Int!, limit: Int!): CompanyConnection
}
Note the extend
.
Type extensions are available on the TypeDefinitionRegistry
and their fields can be accessed as follows:
registry.objectTypeExtensions().values().stream()
.flatMap(Collection::stream)
.flatMap(it -> it.getFieldDefinitions().stream())
.map(fieldDefinition -> {...})