Added usage of context validator in the async executor

This commit is contained in:
Jordão 2020-02-03 18:49:01 -03:00 committed by Christian Legnitto
parent 6a04b113e6
commit 75b597d8f3

View file

@ -250,6 +250,16 @@ where
{
let document = parse_document_source(document_source, &root_node.schema)?;
{
let mut ctx = ValidatorContext::new(&root_node.schema, &document);
visit_all_rules(&mut ctx, &document);
let errors = ctx.into_errors();
if !errors.is_empty() {
return Err(GraphQLError::ValidationError(errors));
}
}
let operation = get_operation(&document, operation_name)?;
{