File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/code/Magento/CustomerGraphQl Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,12 @@ public function execute(ContextParametersInterface $contextParameters): ContextP
56
56
$ customer = $ this ->customerRepository ->getById ($ contextParameters ->getUserId ());
57
57
$ customerGroupId = (int ) $ customer ->getGroupId ();
58
58
} catch (LocalizedException $ e ) {
59
- $ customerGroupId = null ;
59
+ $ customerGroupId = Group:: NOT_LOGGED_IN_ID ;
60
60
}
61
61
}
62
62
if ($ customerGroupId !== null ) {
63
63
$ customerSession ->setCustomerGroupId ($ customerGroupId );
64
- $ contextParameters ->addExtensionAttribute ('customer_group_id ' , $ customerGroupId );
64
+ $ contextParameters ->addExtensionAttribute ('customer_group ' , ( int ) $ customerGroupId );
65
65
}
66
66
return $ contextParameters ;
67
67
}
Original file line number Diff line number Diff line change 8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Api/etc/extension_attributes.xsd" >
9
9
<extension_attributes for =" Magento\GraphQl\Model\Query\ContextInterface" >
10
10
<attribute code =" is_customer" type =" boolean" />
11
- <attribute code =" customer_group_id " type =" integer" />
11
+ <attribute code =" customer_group " type =" integer" />
12
12
</extension_attributes >
13
13
</config >
You can’t perform that action at this time.
0 commit comments