class ParentValue in GraphQL 8.4
Resolves to the current value, which is the parent of the field.
Hierarchy
- class \Drupal\graphql\GraphQL\Resolver\ParentValue implements ResolverInterface
Expanded class hierarchy of ParentValue
1 file declares its use of ParentValue
- ResolverBuilder.php in src/
GraphQL/ ResolverBuilder.php
File
- src/
GraphQL/ Resolver/ ParentValue.php, line 13
Namespace
Drupal\graphql\GraphQL\ResolverView source
class ParentValue implements ResolverInterface {
/**
* {@inheritdoc}
*/
public function resolve($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $field) {
if ($value instanceof CacheableDependencyInterface) {
$context
->addCacheableDependency($value);
}
return $value;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParentValue:: |
public | function |
Resolve values for the fields. Overrides ResolverInterface:: |