UserActorTypeResolver.php in Open Social 10.2.x
Same filename and directory in other branches
Namespace
Drupal\social_user\GraphQLFile
modules/social_features/social_user/src/GraphQL/UserActorTypeResolver.phpView source
<?php
namespace Drupal\social_user\GraphQL;
use Drupal\social_graphql\GraphQL\DecoratableTypeResolver;
use Drupal\user\UserInterface;
/**
* Type resolver for User concrete class of Actor interface.
*/
class UserActorTypeResolver extends DecoratableTypeResolver {
/**
* {@inheritdoc}
*/
protected function resolve($actor) : ?string {
return $actor instanceof UserInterface ? 'User' : NULL;
}
}
Classes
Name | Description |
---|---|
UserActorTypeResolver | Type resolver for User concrete class of Actor interface. |