From cdefbef05c1b2f1a97d4263d0db74103d08442dc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 4 May 2022 18:48:04 +1200 Subject: [PATCH] Remove redundant flags --- app/controllers/api/graphql.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 1aeb1ced06..3c690fee5e 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -90,10 +90,6 @@ function graphqlRequest( throw new Exception('No query supplied.', 400, Exception::GRAPHQL_NO_QUERY); } - $debugFlags = App::isDevelopment() - ? DebugFlag::INCLUDE_DEBUG_MESSAGE | DebugFlag::INCLUDE_TRACE | DebugFlag::RETHROW_INTERNAL_EXCEPTIONS - : DebugFlag::NONE; - $maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 200); $maxDepth = App::getEnv('_APP_GRAPHQL_MAX_QUERY_DEPTH', 3); @@ -115,8 +111,8 @@ function graphqlRequest( $wg = new WaitGroup(); $wg->add(); $promise->then( - function ($result) use ($response, $debugFlags, &$output, $wg) { - $output = $result->toArray($debugFlags); + function ($result) use ($response, &$output, $wg) { + $output = $result->toArray(); $wg->done(); }, function ($error) use ($response, &$output, $wg) {