You are here

class ConnectionEdges in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionEdges.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionEdges
  2. 10.0.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionEdges.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionEdges
  3. 10.1.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionEdges.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionEdges

Produces the edges from a connection object.

Plugin annotation


@DataProducer(
  id = "connection_edges",
  name = @Translation("Connection edges"),
  description = @Translation("Returns the edges of a connection."),
  produces = @ContextDefinition("any",
    label = @Translation("Edges")
  ),
  consumes = {
    "connection" = @ContextDefinition("any",
      label = @Translation("QueryConnection")
    )
  }
)

Hierarchy

  • class \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection\ConnectionEdges extends \Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase implements \Drupal\graphql\Plugin\DataProducerPluginCachingInterface

Expanded class hierarchy of ConnectionEdges

File

modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Connection/ConnectionEdges.php, line 27

Namespace

Drupal\social_graphql\Plugin\GraphQL\DataProducer\Connection
View source
class ConnectionEdges 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
      ->edges();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConnectionEdges::resolve public function Resolves the request.