checkCustomerAccount = $checkCustomerAccount; $this->subscriberFactory = $subscriberFactory; } /** * @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); $status = $this->subscriberFactory->create()->loadByCustomerId((int)$currentUserId)->isSubscribed(); return (bool)$status; } }