class Value in GraphQL 8.4
Resolves by returning the fixed value itself.
Hierarchy
- class \Drupal\graphql\GraphQL\Resolver\Value implements ResolverInterface
Expanded class hierarchy of Value
2 files declare their use of Value
- MockingTrait.php in tests/src/ Traits/ MockingTrait.php 
- ResolverBuilder.php in src/GraphQL/ ResolverBuilder.php 
File
- src/GraphQL/ Resolver/ Value.php, line 13 
Namespace
Drupal\graphql\GraphQL\ResolverView source
class Value implements ResolverInterface {
  /**
   * Value to be resolved.
   *
   * @var mixed
   */
  protected $value;
  /**
   * Value constructor.
   *
   * @param mixed $value
   */
  public function __construct($value) {
    $this->value = $value;
  }
  /**
   * {@inheritdoc}
   */
  public function resolve($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $field) {
    if ($this->value instanceof CacheableDependencyInterface) {
      $context
        ->addCacheableDependency($this->value);
    }
    return $this->value;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| Value:: | protected | property | Value to be resolved. | |
| Value:: | public | function | Resolve values for the fields. Overrides ResolverInterface:: | |
| Value:: | public | function | Value constructor. | 
