Interface SchemaReport
public interface SchemaReport
Report produced as a result of inspecting schema mappings.
The inspection checks if schema fields are covered either by a
DataFetcher
registration, or match a Java object property. Fields
that have neither are reported as unmappedFields()
.
The inspection also checks if any DataFetcher
are registered against
schema fields that don't exist and reports those as unmappedRegistrations()
.
- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Information about a Nullness mismatch between the GraphQL schema and the application code.static interface
Information about a schema type skipped during the inspection. -
Method Summary
Modifier and TypeMethodDescriptionReturn a map withDataFetcher
s and information for its arguments if the schema nullness does not match the nullness of the correspondingAnnotatedElement
in the application.@Nullable DataFetcher
<?> dataFetcher
(FieldCoordinates coordinates) Return theDataFetcher
for the given field coordinates, if registered.Return the coordinates for mismatches when a schema field type nullness information does not match the nullness of the correspondingAnnotatedElement
in the application.schema()
Return the inspected schema with type and field definitions.Return types skipped during the inspection, either because the schema type is not supported, e.g.Return a map withDataFetcher
s and the names of arguments they depend on that don't exist.Return the coordinates of unmapped fields.Return the coordinates for invalidDataFetcher
registrations referring to fields that don't exist in the schema.
-
Method Details
-
schema
GraphQLSchema schema()Return the inspected schema with type and field definitions. -
unmappedFields
List<FieldCoordinates> unmappedFields()Return the coordinates of unmapped fields. Such fields have neither aDataFetcher
registration, such as a@SchemaMapping
method, nor a matching Java property in the return type from the parentDataFetcher
. -
unmappedRegistrations
Map<FieldCoordinates, DataFetcher<?>> unmappedRegistrations()Return the coordinates for invalidDataFetcher
registrations referring to fields that don't exist in the schema. -
unmappedArguments
MultiValueMap<DataFetcher<?>, String> unmappedArguments()Return a map withDataFetcher
s and the names of arguments they depend on that don't exist.- Since:
- 1.3.0
-
fieldsNullnessMismatches
Map<FieldCoordinates, SchemaReport.NullnessMismatch> fieldsNullnessMismatches()Return the coordinates for mismatches when a schema field type nullness information does not match the nullness of the correspondingAnnotatedElement
in the application. -
argumentsNullnessMismatches
MultiValueMap<DataFetcher<?>, SchemaReport.NullnessMismatch> argumentsNullnessMismatches()Return a map withDataFetcher
s and information for its arguments if the schema nullness does not match the nullness of the correspondingAnnotatedElement
in the application. -
skippedTypes
List<SchemaReport.SkippedType> skippedTypes()Return types skipped during the inspection, either because the schema type is not supported, e.g. union, or because there is insufficient Java type information, e.g. controller method that returnsObject
or wrapper type (collection, reactive, asynchronous) with wildcard generics. -
dataFetcher
Return theDataFetcher
for the given field coordinates, if registered.- Parameters:
coordinates
- the field coordinates
-