Skip to content

Commit

Permalink
validate query arguments while processing AST
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Roberts committed Jul 13, 2016
1 parent 9ed11d6 commit 28bef5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Execution/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ protected function executeOperation(Query $query, $currentLevelSchema)
*/
protected function processQueryAST(Query $query, AbstractField $field, $contextValue = null)
{
if (!$this->resolveValidator->validateArguments($field, $query, $this->executionContext->getRequest())) {
return null;
}

$resolvedValue = $this->resolveFieldValue($field, $contextValue, $query);

if (!$this->resolveValidator->isValidValueForField($field, $resolvedValue)) {
Expand Down

0 comments on commit 28bef5e

Please sign in to comment.