Skip to content

Commit c46ca14

Browse files
committed
SchemaMappingInspector enhancements
Support not only GraphQLObjectType, but any GraphQLFieldsContainer, effectively also inspecting fields declared on an interface. Add skipped types to report that includes any non-simple types that have been skipped. Any type that is not a GraphQLFieldsContainer is skipped, including unions. Types may also be skipped because of insufficient Java object type information, e.g. controller method declared to return Object or Mono<?>. Do not report issues related to scalar and enum type fields, which don't have any structure and don't need further checks. See gh-386
1 parent ed94ef0 commit c46ca14

File tree

4 files changed

+361
-245
lines changed

4 files changed

+361
-245
lines changed

spring-graphql/src/main/java/org/springframework/graphql/execution/DefaultSchemaResourceGraphQlSourceBuilder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ protected GraphQLSchema initGraphQlSchema() {
136136
configureGraphQl(builder -> {
137137
GraphQLSchema schema = builder.build().getGraphQLSchema();
138138
SchemaMappingInspector.Report report = SchemaMappingInspector.inspect(schema, runtimeWiring);
139-
if (!report.isEmpty()) {
140-
logger.info(report.getSummary());
141-
}
139+
logger.info(report);
142140
});
143141

144142
return (this.schemaFactory != null ?

0 commit comments

Comments
 (0)