Hello all,
I am working on Graphql api (Magento - 2.4) for B2B customers, the default company query which lists the company users does not give the id since it is deprecated. But I want to update a company user as a logged in company admin from the Client for which I need the user id . I tried using users attribute and structure attribute in the query, but unable to get the id. Could anyone help me in this ??
Magento Reference :
https://devdocs.magento.com/guides/v2.4/graphql/queries/company.html
https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-company-user.html
protected $getCustomer; public function __construct( \Magento\CustomerGraphQl\Model\Customer\GetCustomer $getCustomer ) { $this->getCustomer = $getCustomer; } public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) { if ($context->getExtensionAttributes()->getIsCustomer()) { $customerData = $this->getCustomer->execute($context); $customerId = $customerData->getId(); } }