Search in sources :

Example 1 with NonNullableFieldValidator

use of graphql.execution.NonNullableFieldValidator in project graphql-java by graphql-java.

the class BatchedExecutionStrategy method handleNonNullType.

private void handleNonNullType(ExecutionContext executionContext, FetchedValues fetchedValues) {
    ExecutionTypeInfo typeInfo = fetchedValues.getExecutionTypeInfo();
    NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, typeInfo);
    ExecutionPath path = fetchedValues.getPath();
    for (FetchedValue value : fetchedValues.getValues()) {
        nonNullableFieldValidator.validate(path, value.getValue());
    }
}
Also used : ExecutionTypeInfo(graphql.execution.ExecutionTypeInfo) NonNullableFieldValidator(graphql.execution.NonNullableFieldValidator) ExecutionPath(graphql.execution.ExecutionPath)

Aggregations

ExecutionPath (graphql.execution.ExecutionPath)1 ExecutionTypeInfo (graphql.execution.ExecutionTypeInfo)1 NonNullableFieldValidator (graphql.execution.NonNullableFieldValidator)1