diff --git a/Controller/GraphqliteController.php b/Controller/GraphqliteController.php index 1316201..3af8756 100644 --- a/Controller/GraphqliteController.php +++ b/Controller/GraphqliteController.php @@ -108,7 +108,7 @@ private function handlePsr7Request(ServerRequestInterface $request, Request $sym }, $result); // Let's return the highest result. $statuses = array_map([$httpCodeDecider, 'decideHttpStatusCode'], $result); - $status = max($statuses); + $status = empty($statuses) ? 500 : max($statuses); return new JsonResponse($finalResult, $status); } if ($result instanceof Promise) { diff --git a/composer.json b/composer.json index 566777e..bd897ab 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ ], "require" : { "php" : ">=7.2", - "thecodingmachine/graphqlite" : "~4.0.1", - "thecodingmachine/graphqlite-symfony-validator-bridge" : "~4.0.0", + "thecodingmachine/graphqlite" : "^4.1", + "thecodingmachine/graphqlite-symfony-validator-bridge" : "^4.1", "symfony/framework-bundle": "^4.1.9 | ^5", "symfony/validator": "^4.1.9 | ^5", "symfony/translation": "^4.1.9 | ^5", @@ -52,7 +52,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "4.1.x-dev" } }, "minimum-stability": "dev",