Use exposed nested validator

This commit is contained in:
Jake Barnby 2022-05-04 18:43:51 +12:00
parent 6138e4af5d
commit 7edbb428d0
No known key found for this signature in database
GPG key ID: A4674EBC0E404657
2 changed files with 7 additions and 6 deletions

View file

@ -37,7 +37,7 @@
"ext-sockets": "*",
"appwrite/php-clamav": "1.1.*",
"appwrite/php-runtimes": "0.7.*",
"utopia-php/framework": "0.19.*",
"utopia-php/framework": "dev-feat-graphql-helpers",
"utopia-php/logger": "0.3.*",
"utopia-php/abuse": "0.7.*",
"utopia-php/analytics": "0.2.*",

View file

@ -6,9 +6,6 @@ use Appwrite\GraphQL\Types\JsonType;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response\Model\User;
use GraphQL\Error\Error;
use GraphQL\Error\FormattedError;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Schema;
@ -210,8 +207,12 @@ class Builder
$type = Type::boolean();
break;
case 'Utopia\Validator\ArrayList':
$nested = (fn() => $this->validator)->bindTo($validator, $validator)();
$type = Type::listOf(self::getParameterArgType($utopia, $nested, $required, $injections));
$type = Type::listOf(self::getParameterArgType(
$utopia,
$validator->getValidator(),
$required,
$injections)
);
break;
case 'Utopia\Validator\Numeric':
case 'Utopia\Validator\Integer':