You are here

UserActorTypeResolver.php in Open Social 10.2.x

File

modules/social_features/social_user/src/GraphQL/UserActorTypeResolver.php
View 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

Namesort descending Description
UserActorTypeResolver Type resolver for User concrete class of Actor interface.