public function ResolverBuilder::fromPath in GraphQL 8.4
Add a property path resolver.
Parameters
string $type:
string $path:
\Drupal\graphql\GraphQL\Resolver\ResolverInterface $value:
Return value
\Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerProxy
File
- src/
GraphQL/ ResolverBuilder.php, line 117
Class
- ResolverBuilder
- Wires and maps different resolvers together to build the GraphQL tree.
Namespace
Drupal\graphql\GraphQLCode
public function fromPath($type, $path, ResolverInterface $value = NULL) {
return $this
->produce('property_path')
->map('type', $this
->fromValue($type))
->map('path', $this
->fromValue($path))
->map('value', $value ?: $this
->fromParent());
}