From 996812b354e0dc28081d3d6f3d7701676e80c38d Mon Sep 17 00:00:00 2001 From: ultramegatom Date: Tue, 22 Nov 2022 13:36:54 +0100 Subject: [PATCH] Fix Warning: Warning: Undefined array key "columns" (#633) Fix Warning: Undefined array key "columnConfig" --- src/Configuration.php | 2 +- src/GraphQL/Mutation/MutationType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Configuration.php b/src/Configuration.php index 15d15e2f..42a56638 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -423,7 +423,7 @@ public function getQueryColumnConfig($entityName) */ public function getMutationColumnConfig($entityName) { - return $this->getMutationEntityConfig($entityName)['columnConfig']; + return $this->getMutationEntityConfig($entityName)['columnConfig'] ?? []; } /** diff --git a/src/GraphQL/Mutation/MutationType.php b/src/GraphQL/Mutation/MutationType.php index e6032a71..edfad65a 100644 --- a/src/GraphQL/Mutation/MutationType.php +++ b/src/GraphQL/Mutation/MutationType.php @@ -779,7 +779,7 @@ public function generateInputFieldsAndProcessors(&$inputFields, &$processors, $c /** @var Configuration $configurationItem */ $configurationItem = $context['configuration']; - $columns = $configurationItem->getMutationColumnConfig($entity)['columns']; + $columns = $configurationItem->getMutationColumnConfig($entity)['columns'] ?? []; if ($columns) { $fieldHelper = $this->getGraphQlService()->getObjectFieldHelper();