You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking for this "error" I found the class ResolveValidator, lines 54 - 60
if (!$argument->getType()->isValidValue($argumentType->parseValue($astArgument->getValue()))) {
$error = $argument->getType()->getLastError();
thrownewResolveException($error ? $error : sprintf('Not valid type for argument "%s" in query "%s"', $astArgument->getName(), $field->getName()), $astArgument->getLocation());
}
The problem here is the function parseValue return a null value and isValidValue verify input NULL instead of original value.
SOLUTION
I think inside the function "isValidValue" (AbstractType) should be call inside to "parseValue", to know the original value and if It get a NULL it will throw an error.
if (!$argument->getType()->isValidValue($astArgument->getValue())) {
$error = $argument->getType()->getLastError();
thrownewResolveException($error ? $error : sprintf('Not valid type for argument "%s" in query "%s"', $astArgument->getName(), $field->getName()), $astArgument->getLocation());
}
and each Validator call to parseValue if it's necessary
The text was updated successfully, but these errors were encountered:
MGDSoft
changed the title
DateTime types doesnt show invalid input data
DateTime types doesn't show invalid input data
May 11, 2017
MGDSoft
changed the title
DateTime types doesn't show invalid input data
DateTime/Enum types doesn't show invalid input data
May 11, 2017
Hi,
If I have a param with DateTime and write a bad input, It doesnt show an error. And in resolver I get a null value...
Example
Execute with this query
and result is
Looking for this "error" I found the class ResolveValidator, lines 54 - 60
The problem here is the function parseValue return a null value and isValidValue verify input NULL instead of original value.
SOLUTION
I think inside the function "isValidValue" (AbstractType) should be call inside to "parseValue", to know the original value and if It get a NULL it will throw an error.
and each Validator call to parseValue if it's necessary
The text was updated successfully, but these errors were encountered: