1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

Remove debug flags on production instead of abuse enabled

This commit is contained in:
Jake Barnby 2022-12-15 13:44:23 +13:00
parent ab08f0ca40
commit d107b92748
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
3 changed files with 5 additions and 1 deletions

View file

@ -188,6 +188,8 @@ function execute(
$validations[] = new DisableIntrospection();
$validations[] = new QueryComplexity($maxComplexity);
$validations[] = new QueryDepth($maxDepth);
}
if (App::getMode() === App::MODE_TYPE_PRODUCTION) {
$flags = DebugFlag::NONE;
}

View file

@ -1096,6 +1096,7 @@ App::setResource('schema', function ($utopia, $dbForProject) {
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
},
];
$params = [
'list' => function (string $databaseId, string $collectionId, array $args) {
return [ 'queries' => $args['queries']];

View file

@ -161,7 +161,8 @@ class Mapper
];
}
// If model has no properties, explicitly add a 'status' field because GraphQL requires at least 1 field per type.
// If model has no properties, explicitly add a 'status' field
// because GraphQL requires at least 1 field per type.
if (!$model->isAny() && empty($model->getRules())) {
$fields['status'] = [
'type' => Type::string(),