Skip to content

Commit

Permalink
Fix Warning: Warning: Undefined array key "columns" (#633)
Browse files Browse the repository at this point in the history
Fix Warning: Undefined array key "columnConfig"
  • Loading branch information
ultramegatom authored Nov 22, 2022
1 parent 0f31e82 commit 996812b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public function getQueryColumnConfig($entityName)
*/
public function getMutationColumnConfig($entityName)
{
return $this->getMutationEntityConfig($entityName)['columnConfig'];
return $this->getMutationEntityConfig($entityName)['columnConfig'] ?? [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Mutation/MutationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 996812b

Please sign in to comment.