diff --git a/src/Appwrite/GraphQL/Builder.php b/src/Appwrite/GraphQL/Builder.php index e926da1355..be007cbab8 100644 --- a/src/Appwrite/GraphQL/Builder.php +++ b/src/Appwrite/GraphQL/Builder.php @@ -189,6 +189,7 @@ class Builder switch ((!empty($validator)) ? \get_class($validator) : '') { case 'Appwrite\Auth\Validator\Password': + case 'Appwrite\Event\Validator\Event': case 'Appwrite\Network\Validator\CNAME': case 'Appwrite\Network\Validator\Domain': case 'Appwrite\Network\Validator\Email': @@ -235,9 +236,11 @@ class Builder break; case 'Utopia\Validator\Assoc': case 'Utopia\Validator\JSON': - default: $type = self::json(); break; + default: + $type = Type::string(); + break; } if ($required) { diff --git a/tests/e2e/Services/GraphQL/GraphQLBase.php b/tests/e2e/Services/GraphQL/GraphQLBase.php index 4d5df15705..21825b65df 100644 --- a/tests/e2e/Services/GraphQL/GraphQLBase.php +++ b/tests/e2e/Services/GraphQL/GraphQLBase.php @@ -1066,7 +1066,7 @@ trait GraphQLBase } }'; case self::$CREATE_FUNCTION: - return 'mutation createFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String! $vars: Json, $events: [Json], $schedule: String, $timeout: Int) { + return 'mutation createFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String! $vars: Json, $events: [String], $schedule: String, $timeout: Int) { functionsCreate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, vars: $vars, events: $events, schedule: $schedule, timeout: $timeout) { _id name @@ -1075,7 +1075,7 @@ trait GraphQLBase } }'; case self::$UPDATE_FUNCTION: - return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $vars: Json, $events: [Json], $schedule: String, $timeout: Int) { + return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $vars: Json, $events: [String], $schedule: String, $timeout: Int) { functionsUpdate(functionId: $functionId, name: $name, execute: $execute, vars: $vars, events: $events, schedule: $schedule, timeout: $timeout) { _id name