public function UserFromWrapper::resolve in Open Social 10.3.x
Same name and namespace in other branches
- 10.1.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserFromWrapper.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserFromWrapper::resolve()
- 10.2.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserFromWrapper.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserFromWrapper::resolve()
Resolves the value.
Parameters
\Drupal\social_user\Wrappers\UserAwareInterface $data: A class that contains user information.
Return value
\Drupal\user\UserInterface|null The user entity.
File
- modules/
social_features/ social_user/ src/ Plugin/ GraphQL/ DataProducer/ UserFromWrapper.php, line 39
Class
- UserFromWrapper
- Get the user information from a relationship.
Namespace
Drupal\social_user\Plugin\GraphQL\DataProducerCode
public function resolve(UserAwareInterface $data) : ?UserInterface {
return $data
->getUser();
}