Remove debug flags on production instead of abuse enabled
This commit is contained in:
parent
ab08f0ca40
commit
d107b92748
3 changed files with 5 additions and 1 deletions
|
@ -188,6 +188,8 @@ function execute(
|
||||||
$validations[] = new DisableIntrospection();
|
$validations[] = new DisableIntrospection();
|
||||||
$validations[] = new QueryComplexity($maxComplexity);
|
$validations[] = new QueryComplexity($maxComplexity);
|
||||||
$validations[] = new QueryDepth($maxDepth);
|
$validations[] = new QueryDepth($maxDepth);
|
||||||
|
}
|
||||||
|
if (App::getMode() === App::MODE_TYPE_PRODUCTION) {
|
||||||
$flags = DebugFlag::NONE;
|
$flags = DebugFlag::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1096,6 +1096,7 @@ App::setResource('schema', function ($utopia, $dbForProject) {
|
||||||
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
|
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'list' => function (string $databaseId, string $collectionId, array $args) {
|
'list' => function (string $databaseId, string $collectionId, array $args) {
|
||||||
return [ 'queries' => $args['queries']];
|
return [ 'queries' => $args['queries']];
|
||||||
|
|
|
@ -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())) {
|
if (!$model->isAny() && empty($model->getRules())) {
|
||||||
$fields['status'] = [
|
$fields['status'] = [
|
||||||
'type' => Type::string(),
|
'type' => Type::string(),
|
||||||
|
|
Loading…
Reference in a new issue