You are here

public function DefaultValue::__construct in GraphQL 8.4

DefaultValue constructor.

Parameters

\Drupal\graphql\GraphQL\Resolver\ResolverInterface $value: The initial value to check.

\Drupal\graphql\GraphQL\Resolver\ResolverInterface $default: The fallback value returned if the initial one resolves to NULL.

File

src/GraphQL/Resolver/DefaultValue.php, line 40

Class

DefaultValue
Default value resolver.

Namespace

Drupal\graphql\GraphQL\Resolver

Code

public function __construct(ResolverInterface $value, ResolverInterface $default) {
  $this->value = $value;
  $this->default = $default;
}