1
0
Fork 0
mirror of synced 2024-07-07 15:36:19 +12:00

Handle event validator parsing

This commit is contained in:
Jake Barnby 2022-07-06 15:57:14 +12:00
parent 99262e28fe
commit 39233cfe1c
2 changed files with 6 additions and 3 deletions

View file

@ -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) {

View file

@ -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