Skip to content

Commit 3ea13a8

Browse files
committed
magento/graphql-ce#1052: Remove redundant logic in createCustomer mutation
- revert changes, since framework validates `non-nullable` but not empty input
1 parent 24dbfba commit 3ea13a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/CreateCustomer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ public function resolve(
6363
array $value = null,
6464
array $args = null
6565
) {
66+
if (empty($args['input']) || !is_array($args['input'])) {
67+
throw new GraphQlInputException(__('"input" value should be specified'));
68+
}
69+
6670
if (!$this->newsLetterConfig->isActive(ScopeInterface::SCOPE_STORE)) {
6771
$args['input']['is_subscribed'] = false;
6872
}

0 commit comments

Comments
 (0)