mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 14:26:08 +03:00
Several validator fixes
This commit is contained in:
parent
e82f887918
commit
a6a4f7862b
@ -6,9 +6,9 @@ use GraphQL\Error;
|
||||
use GraphQL\Language\AST\Node;
|
||||
use GraphQL\Language\AST\VariableDefinition;
|
||||
use GraphQL\Language\Printer;
|
||||
use GraphQL\Language\Visitor;
|
||||
use GraphQL\Type\Definition\NonNull;
|
||||
use GraphQL\Validator\DocumentValidator;
|
||||
use GraphQL\Validator\Messages;
|
||||
use GraphQL\Validator\ValidationContext;
|
||||
|
||||
class DefaultValuesOfCorrectType
|
||||
@ -49,8 +49,10 @@ class DefaultValuesOfCorrectType
|
||||
));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return Visitor::skipNode();
|
||||
},
|
||||
Node::SELECTION_SET => function() {return Visitor::skipNode();},
|
||||
Node::FRAGMENT_DEFINITION => function() {return Visitor::skipNode();}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace GraphQL\Validator\Rules;
|
||||
use GraphQL\Error;
|
||||
use GraphQL\Language\AST\Argument;
|
||||
use GraphQL\Language\AST\Node;
|
||||
use GraphQL\Language\Visitor;
|
||||
use GraphQL\Validator\ValidationContext;
|
||||
|
||||
class UniqueArgumentNames
|
||||
@ -36,7 +37,7 @@ class UniqueArgumentNames
|
||||
} else {
|
||||
$this->knownArgNames[$argName] = $node->name;
|
||||
}
|
||||
return false;
|
||||
return Visitor::skipNode();
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class UniqueFragmentNames
|
||||
} else {
|
||||
$this->knownFragmentNames[$fragmentName] = $node->name;
|
||||
}
|
||||
return false;
|
||||
return Visitor::skipNode();
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class UniqueOperationNames
|
||||
$this->knownOperationNames[$operationName->value] = $operationName;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return Visitor::skipNode();
|
||||
},
|
||||
Node::FRAGMENT_DEFINITION => function() {
|
||||
return Visitor::skipNode();
|
||||
|
Loading…
Reference in New Issue
Block a user