Skip to content

Commit

Permalink
Removed default value from request->get
Browse files Browse the repository at this point in the history
  • Loading branch information
mcop1 committed Sep 4, 2024
1 parent b6433ed commit 0601e56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Controller/WebserviceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function webonyxAction(
LongRunningHelper $longRunningHelper
) {
$clientname = $request->attributes->getString('clientname');
$variableValues = null;

$configuration = Configuration::getByName($clientname);
if (!$configuration || !$configuration->isActive()) {
Expand Down Expand Up @@ -161,7 +162,7 @@ public function webonyxAction(
}

$query = $input['query'] ?? '';
$variableValues = $input['variables'] ?? null;


try {
$rootValue = [];
Expand All @@ -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;
Expand Down

0 comments on commit 0601e56

Please sign in to comment.