From 3530d3dfe04ee88fe31fd0a9a4521779f0853f3f Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 18 Jul 2022 19:29:37 +1200 Subject: [PATCH] Update env defaults --- app/config/variables.php | 4 ++-- app/controllers/api/graphql.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 7243c17a4c..0116c8d335 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -840,7 +840,7 @@ return [ 'name' => '_APP_GRAPHQL_MAX_BATCH_SIZE', 'description' => 'Maximum number of batched queries per request. The default value is 50.', 'introduction' => '0.17.0', - 'default' => '50', + 'default' => '10', 'required' => false, 'question' => '', 'filter' => '' @@ -849,7 +849,7 @@ return [ 'name' => '_APP_GRAPHQL_MAX_COMPLEXITY', 'description' => 'Maximum complexity of a GraphQL query. The default value is 200.', 'introduction' => '0.17.0', - 'default' => '200', + 'default' => '50', 'required' => false, 'question' => '', 'filter' => '' diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index d2288a8d85..79f3fa8d62 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -69,8 +69,8 @@ function graphqlRequest( Type\Schema $schema ): void { $contentType = $request->getHeader('content-type'); - $maxBatchSize = App::getEnv('_APP_GRAPHQL_MAX_BATCH_SIZE', 50); - $maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 200); + $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); if (\str_starts_with($contentType, 'application/graphql')) {