Update variables and defaults

This commit is contained in:
Jake Barnby
2022-09-23 15:55:10 +12:00
parent 63a4853563
commit a3b75a374b
3 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -81,9 +81,9 @@ _APP_USAGE_DATABASE_INTERVAL=15
_APP_USAGE_STATS=enabled
_APP_LOGGING_PROVIDER=
_APP_LOGGING_CONFIG=
_APP_GRAPHQL_MAX_BATCH_SIZE=
_APP_GRAPHQL_MAX_COMPLEXITY=
_APP_GRAPHQL_MAX_DEPTH=
_APP_GRAPHQL_MAX_BATCH_SIZE=10
_APP_GRAPHQL_MAX_COMPLEXITY=3
_APP_GRAPHQL_MAX_DEPTH=250
DOCKERHUB_PULL_USERNAME=
DOCKERHUB_PULL_PASSWORD=
DOCKERHUB_PULL_EMAIL=
+6 -6
View File
@@ -866,7 +866,7 @@ return [
[
'name' => '_APP_GRAPHQL_MAX_BATCH_SIZE',
'description' => 'Maximum number of batched queries per request. The default value is 10.',
'introduction' => '0.17.0',
'introduction' => '1.2.0',
'default' => '10',
'required' => false,
'question' => '',
@@ -874,17 +874,17 @@ return [
],
[
'name' => '_APP_GRAPHQL_MAX_COMPLEXITY',
'description' => 'Maximum complexity of a GraphQL query. The default value is 50.',
'introduction' => '0.17.0',
'default' => '50',
'description' => 'Maximum complexity of a GraphQL query. One field adds one to query complexity. Lists multiply the complexity by the number of items requested. The default value is 250.',
'introduction' => '1.2.0',
'default' => '250',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_GRAPHQL_MAX_DEPTH',
'description' => 'Maximum depth of a GraphQL query. The default value is 3.',
'introduction' => '0.17.0',
'description' => 'Maximum depth of a GraphQL query. One nested field level adds one to query depth. The default value is 3.',
'introduction' => '1.2.0',
'default' => '3',
'required' => false,
'question' => '',
+2 -2
View File
@@ -105,8 +105,8 @@ function executeRequest(
$contentType = $request->getHeader('content-type');
$maxBatchSize = App::getEnv('_APP_GRAPHQL_MAX_BATCH_SIZE', 10);
$maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 50);
$maxDepth = App::getEnv('_APP_GRAPHQL_MAX_QUERY_DEPTH', 3);
$maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_COMPLEXITY', 250);
$maxDepth = App::getEnv('_APP_GRAPHQL_MAX_DEPTH', 3);
if (\str_starts_with($contentType, 'application/graphql')) {
$query = parseGraphqlRequest($request);