From 0601e5612fb87886d2cfc954f6b7cf38959ef1d4 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 4 Sep 2024 08:36:43 +0200 Subject: [PATCH] Removed default value from request->get --- src/Controller/WebserviceController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Controller/WebserviceController.php b/src/Controller/WebserviceController.php index ba9786e8..1b9b90ff 100644 --- a/src/Controller/WebserviceController.php +++ b/src/Controller/WebserviceController.php @@ -93,6 +93,7 @@ public function webonyxAction( LongRunningHelper $longRunningHelper ) { $clientname = $request->attributes->getString('clientname'); + $variableValues = null; $configuration = Configuration::getByName($clientname); if (!$configuration || !$configuration->isActive()) { @@ -161,7 +162,7 @@ public function webonyxAction( } $query = $input['query'] ?? ''; - $variableValues = $input['variables'] ?? null; + try { $rootValue = []; @@ -178,7 +179,11 @@ public function webonyxAction( $this->eventDispatcher->dispatch($event, ExecutorEvents::PRE_EXECUTE); if ($event->getRequest() instanceof Request) { - $variableValues = $event->getRequest()->request->get('variables', $variableValues); + $variableValues = $event->getRequest()->request->get('variables'); + } + + if(empty($variableValues)) { + $variableValues = $input['variables'] ?? null; } $configAllowIntrospection = true;