Skip to content

ConnectionTypeDefinitionConfigurer should consider object type extensions #816

Closed
@ooraini

Description

@ooraini

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 -> {...})

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions