File tree 1 file changed +4
-4
lines changed
app/code/Magento/CustomerGraphQl/Model/Resolver/Customer/Account
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 13
13
use Magento \CustomerGraphQl \Model \Resolver \Customer \CustomerDataProvider ;
14
14
use Magento \Framework \GraphQl \Config \Element \Field ;
15
15
use Magento \Framework \GraphQl \Exception \GraphQlAuthorizationException ;
16
- use Magento \Framework \GraphQl \Query \ Resolver \ Value ;
16
+ use Magento \Framework \GraphQl \Exception \ GraphQlInputException ;
17
17
use Magento \Framework \GraphQl \Query \ResolverInterface ;
18
18
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
19
19
@@ -61,8 +61,8 @@ public function resolve(
61
61
ResolveInfo $ info ,
62
62
array $ value = null ,
63
63
array $ args = null
64
- ): Value {
65
- $ customerId = (int ) $ this ->userContext ->getUserId ();
64
+ ) {
65
+ $ customerId = (int )$ this ->userContext ->getUserId ();
66
66
67
67
if ($ customerId === 0 ) {
68
68
throw new GraphQlAuthorizationException (
@@ -81,6 +81,6 @@ public function resolve(
81
81
$ this ->accountManagement ->changePasswordById ($ customerId , $ args ['currentPassword ' ], $ args ['newPassword ' ]);
82
82
$ data = $ this ->customerResolver ->getCustomerById ($ customerId );
83
83
84
- return ! empty ( $ data) ? $ data : [] ;
84
+ return $ data ;
85
85
}
86
86
}
You can’t perform that action at this time.
0 commit comments