File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/code/Magento/CustomerGraphQl/Model/Resolver Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
namespace Magento \CustomerGraphQl \Model \Resolver ;
9
9
10
10
use Magento \CustomerGraphQl \Model \Customer \GetCustomer ;
11
+ use Magento \Framework \Exception \LocalizedException ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Framework \GraphQl \Config \Element \Field ;
13
14
use Magento \Framework \GraphQl \Query \ResolverInterface ;
@@ -50,7 +51,11 @@ public function resolve(
50
51
array $ value = null ,
51
52
array $ args = null
52
53
) {
53
- $ customer = $ this ->getCustomer ->execute ($ context );
54
+ if (!isset ($ value ['model ' ])) {
55
+ throw new LocalizedException (__ ('"model" value should be specified ' ));
56
+ }
57
+ /** @var Customer $customer */
58
+ $ customer = $ value ['model ' ];
54
59
55
60
$ status = $ this ->subscriberFactory ->create ()->loadByCustomerId ((int )$ customer ->getId ())->isSubscribed ();
56
61
return (bool )$ status ;
You can’t perform that action at this time.
0 commit comments