class ConnectionNodes in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionNodes.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionNodes
- 10.1.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionNodes.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionNodes
- 10.2.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionNodes.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionNodes
Produces the edges from a connection object.
Plugin annotation
@DataProducer(
id = "connection_nodes",
name = @Translation("Connection nodes"),
description = @Translation("Returns the nodes of a connection."),
produces = @ContextDefinition("any",
label = @Translation("Nodes")
),
consumes = {
"connection" = @ContextDefinition("any",
label = @Translation("EntityConnection")
)
}
)
Hierarchy
- class \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionNodes extends \Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase implements \Drupal\graphql\Plugin\DataProducerPluginCachingInterface
Expanded class hierarchy of ConnectionNodes
File
- modules/
custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Connection/ ConnectionNodes.php, line 26
Namespace
Drupal\social_graphql\Plugin\GraphQL\DataProducer\ConnectionView source
class ConnectionNodes extends DataProducerPluginBase implements DataProducerPluginCachingInterface {
/**
* Resolves the request.
*
* @param \Drupal\social_graphql\GraphQL\ConnectionInterface $connection
* The connection to return the edges from.
*
* @return mixed
* The edges for the connection.
*/
public function resolve(ConnectionInterface $connection) {
return $connection
->nodes();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConnectionNodes:: |
public | function | Resolves the request. |