checkCustomerAccount = $checkCustomerAccount; $this->customerDataProvider = $customerDataProvider; } /** * @inheritdoc */ public function resolve( Field $field, $context, ResolveInfo $info, array $value = null, array $args = null ) { $currentUserId = $context->getUserId(); $currentUserType = $context->getUserType(); $this->checkCustomerAccount->execute($currentUserId, $currentUserType); $currentUserId = (int)$currentUserId; $data = $this->customerDataProvider->getCustomerById($currentUserId); return $data; } }