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 interfaceInformation about a Nullness error between the GraphQL schema and the application code.static interfaceInformation about a schema type skipped during the inspection. -
Method Summary
Modifier and TypeMethodDescriptionMultiValueMap<graphql.schema.DataFetcher<?>, SchemaReport.NullnessError> Return a map withDataFetchers and information for its arguments if there is a nullness error between the schema arguments and the correspondingAnnotatedElementin the application.@Nullable graphql.schema.DataFetcher<?> dataFetcher(graphql.schema.FieldCoordinates coordinates) Return theDataFetcherfor the given field coordinates, if registered.Map<graphql.schema.FieldCoordinates, SchemaReport.NullnessError> Return the coordinates for nullness errors between schema fields and the correspondingAnnotatedElementin the application.graphql.schema.GraphQLSchemaschema()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.MultiValueMap<graphql.schema.DataFetcher<?>, String> Return a map withDataFetchers and the names of arguments they depend on that don't exist.List<graphql.schema.FieldCoordinates> Return the coordinates of unmapped fields.Map<graphql.schema.FieldCoordinates, graphql.schema.DataFetcher<?>> Return the coordinates for invalidDataFetcherregistrations referring to fields that don't exist in the schema.
-
Method Details
-
schema
graphql.schema.GraphQLSchema schema()Return the inspected schema with type and field definitions. -
unmappedFields
List<graphql.schema.FieldCoordinates> unmappedFields()Return the coordinates of unmapped fields. Such fields have neither aDataFetcherregistration, such as a@SchemaMappingmethod, nor a matching Java property in the return type from the parentDataFetcher. -
unmappedRegistrations
Map<graphql.schema.FieldCoordinates, graphql.schema.DataFetcher<?>> unmappedRegistrations()Return the coordinates for invalidDataFetcherregistrations referring to fields that don't exist in the schema. -
unmappedArguments
MultiValueMap<graphql.schema.DataFetcher<?>, String> unmappedArguments()Return a map withDataFetchers and the names of arguments they depend on that don't exist.- Since:
- 1.3.0
-
fieldNullnessErrors
Map<graphql.schema.FieldCoordinates, SchemaReport.NullnessError> fieldNullnessErrors()Return the coordinates for nullness errors between schema fields and the correspondingAnnotatedElementin the application.- See Also:
-
argumentNullnessErrors
MultiValueMap<graphql.schema.DataFetcher<?>, SchemaReport.NullnessError> argumentNullnessErrors()Return a map withDataFetchers and information for its arguments if there is a nullness error between the schema arguments and the correspondingAnnotatedElementin the application.- See Also:
-
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 returnsObjector wrapper type (collection, reactive, asynchronous) with wildcard generics. -
dataFetcher
@Nullable graphql.schema.DataFetcher<?> dataFetcher(graphql.schema.FieldCoordinates coordinates) Return theDataFetcherfor the given field coordinates, if registered.- Parameters:
coordinates- the field coordinates
-