Argument.php in GraphQL 8.4
File
src/GraphQL/Resolver/Argument.php
View source
<?php
namespace Drupal\graphql\GraphQL\Resolver;
use Drupal\graphql\GraphQL\Execution\FieldContext;
use Drupal\graphql\GraphQL\Execution\ResolveContext;
use GraphQL\Type\Definition\ResolveInfo;
class Argument implements ResolverInterface {
protected $name;
public function __construct($name) {
$this->name = $name;
}
public function resolve($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $field) {
return $args[$this->name] ?? NULL;
}
}
Classes
Name |
Description |
Argument |
Resolves by an argument name lookup. |