use of graphql.execution.instrumentation.parameters.InstrumentationValidationParameters in project graphql-java by graphql-java.
the class GraphQL method validate.
private List<ValidationError> validate(ExecutionInput executionInput, Document document, GraphQLSchema graphQLSchema, InstrumentationState instrumentationState) {
InstrumentationContext<List<ValidationError>> validationCtx = instrumentation.beginValidation(new InstrumentationValidationParameters(executionInput, document, graphQLSchema, instrumentationState));
Validator validator = new Validator();
List<ValidationError> validationErrors = validator.validateDocument(graphQLSchema, document);
validationCtx.onCompleted(validationErrors, null);
return validationErrors;
}
Aggregations