class EdgeNode in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeNode.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeNode
- 10.1.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeNode.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeNode
- 10.2.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Edge/EdgeNode.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeNode
Returns the node for an edge.
Plugin annotation
@DataProducer(
  id = "edge_node",
  name = @Translation("Edge node"),
  description = @Translation("Returns the node associated with an edge."),
  produces = @ContextDefinition("any",
    label = @Translation("Node")
  ),
  consumes = {
    "edge" = @ContextDefinition("any",
      label = @Translation("EdgeInterface")
    )
  }
)
Hierarchy
- class \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Edge\EdgeNode extends \Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase implements \Drupal\graphql\Plugin\DataProducerPluginCachingInterface
Expanded class hierarchy of EdgeNode
File
- modules/custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Edge/ EdgeNode.php, line 26 
Namespace
Drupal\social_graphql\Plugin\GraphQL\DataProducer\EdgeView source
class EdgeNode extends DataProducerPluginBase implements DataProducerPluginCachingInterface {
  /**
   * Resolves the value.
   *
   * @param \Drupal\social_graphql\Wrappers\EdgeInterface $edge
   *   The edge to retrieve the node from.
   *
   * @return mixed
   *   The graph node.
   */
  public function resolve(EdgeInterface $edge) {
    return $edge
      ->getNode();
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| EdgeNode:: | public | function | Resolves the value. | 
