You are here

class Tap in GraphQL 8.4

Resolves by forwarding to another resolver.

Hierarchy

Expanded class hierarchy of Tap

1 file declares its use of Tap
ResolverBuilder.php in src/GraphQL/ResolverBuilder.php

File

src/GraphQL/Resolver/Tap.php, line 12

Namespace

Drupal\graphql\GraphQL\Resolver
View source
class Tap implements ResolverInterface {

  /**
   * Resolver to tap.
   *
   * @var mixed
   */
  protected $resolver;

  /**
   * Tap constructor.
   *
   * @param \Drupal\graphql\GraphQL\Resolver\ResolverInterface $resolver
   */
  public function __construct(ResolverInterface $resolver) {
    $this->resolver = $resolver;
  }

  /**
   * {@inheritdoc}
   */
  public function resolve($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $field) {
    $this->resolver
      ->resolve($value, $args, $context, $info, $field);
    return $value;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Tap::$resolver protected property Resolver to tap.
Tap::resolve public function Resolve values for the fields. Overrides ResolverInterface::resolve
Tap::__construct public function Tap constructor.