Interface SchemaReport.NullnessError
- Enclosing interface:
SchemaReport
public static interface SchemaReport.NullnessError
Information about a Nullness error between the GraphQL schema and the application code.
Errors are raised when the application nullness information breaks requirements
from the schema: a schema field is marked as "non-null" (like "id: ID!"),
but the application element is "nullable" (like @Nullable String getId();).
The opposite ("author: Author" and @NonNull Author getAuthor();
is not considered as an error, because if an exception is raised while fetching a
field, the GraphQL engine will null out fields in the hierarchy up until null
is allowed. A schema consistently using "non-null" types will not return partial responses.
- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionThe annotated element implementing the considered part of the schema.Nullness in the application code.Nullness expected in the schema.
-
Method Details
-
schemaNullness
Nullness schemaNullness()Nullness expected in the schema. -
applicationNullness
Nullness applicationNullness()Nullness in the application code. -
annotatedElement
AnnotatedElement annotatedElement()The annotated element implementing the considered part of the schema.
-