We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a250c1 commit 21e719cCopy full SHA for 21e719c
app/code/Magento/CustomerGraphQl/Model/Resolver/Customer/Account/GenerateCustomerToken.php
@@ -52,13 +52,10 @@ public function resolve(
52
ResolveInfo $info,
53
array $value = null,
54
array $args = null
55
- ): Value {
+ ) {
56
try {
57
$token = $this->customerTokenService->createCustomerAccessToken($args['email'], $args['password']);
58
- $result = function () use ($token) {
59
- return !empty($token) ? ['token' => $token] : '';
60
- };
61
- return $this->valueFactory->create($result);
+ return !empty($token) ? ['token' => $token] : '';
62
} catch (AuthenticationException $e) {
63
throw new GraphQlAuthorizationException(
64
__($e->getMessage())
0 commit comments