diff --git a/.env b/.env index e6571a3972..1c53d4586a 100644 --- a/.env +++ b/.env @@ -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= \ No newline at end of file diff --git a/app/config/variables.php b/app/config/variables.php index 6f88170e01..cba5cdcf6d 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -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' => '', diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 97d07283ca..7c47d57cf3 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -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);