public class NonNullableFieldValidator
extends java.lang.Object
NonNullableFieldWasNullException
if this is not the case.
See: http://facebook.github.io/graphql/#sec-Errors-and-Non-NullabilityConstructor and Description |
---|
NonNullableFieldValidator(ExecutionContext executionContext,
ExecutionStepInfo executionStepInfo) |
Modifier and Type | Method and Description |
---|---|
<T> T |
validate(ExecutionPath path,
T result)
Called to check that a value is non null if the type requires it to be non null
|
public NonNullableFieldValidator(ExecutionContext executionContext, ExecutionStepInfo executionStepInfo)
public <T> T validate(ExecutionPath path, T result) throws NonNullableFieldWasNullException
T
- the type of the resultpath
- the path to this placeresult
- the result to checkNonNullableFieldWasNullException
- if the value is null but the type requires it to be non null