Added usage of context validator in the async executor
This commit is contained in:
parent
6a04b113e6
commit
75b597d8f3
1 changed files with 10 additions and 0 deletions
|
@ -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)?;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue