interface ConnectionInterface in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/custom/social_graphql/src/GraphQL/ConnectionInterface.php \Drupal\social_graphql\GraphQL\ConnectionInterface
- 10.0.x modules/custom/social_graphql/src/GraphQL/ConnectionInterface.php \Drupal\social_graphql\GraphQL\ConnectionInterface
- 10.1.x modules/custom/social_graphql/src/GraphQL/ConnectionInterface.php \Drupal\social_graphql\GraphQL\ConnectionInterface
Provides the interface for connections.
Hierarchy
- interface \Drupal\social_graphql\GraphQL\ConnectionInterface
Expanded class hierarchy of ConnectionInterface
All classes that implement ConnectionInterface
3 files declare their use of ConnectionInterface
- ConnectionEdges.php in modules/
custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Connection/ ConnectionEdges.php - ConnectionNodes.php in modules/
custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Connection/ ConnectionNodes.php - ConnectionPageInfo.php in modules/
custom/ social_graphql/ src/ Plugin/ GraphQL/ DataProducer/ Connection/ ConnectionPageInfo.php
File
- modules/
custom/ social_graphql/ src/ GraphQL/ ConnectionInterface.php, line 10
Namespace
Drupal\social_graphql\GraphQLView source
interface ConnectionInterface {
/**
* Specifies the pagination parameters for this query.
*
* This can only be called before results have been fetched.
*
* @param int|null $first
* The limit of N first results (either first XOR last must be set).
* @param string|null $after
* The cursor after which to fetch results (when using `$first`).
* @param int|null $last
* The limit of N last results (either first XOR last must be set).
* @param string|null $before
* The cursor before which to fetch results (when using `$last`).
* @param bool $reverse
* Whether the sorting is in reversed order.
*
* @return $this
* This connection instance.
*/
public function setPagination(?int $first, ?string $after, ?int $last, ?string $before, bool $reverse) : self;
/**
* Get the page info from the connection.
*
* @return \GraphQL\Executor\Promise\Adapter\SyncPromise
* An promise that resolves to an array containing the fields of page info.
*/
public function pageInfo() : SyncPromise;
/**
* Get the edges from the connection.
*
* @return \GraphQL\Executor\Promise\Adapter\SyncPromise
* A promise that resolves to an array of EntityEdge instances.
*/
public function edges() : SyncPromise;
/**
* Get hte nodes for this connection.
*
* This allows bypassing of the edges in case edge information isn't needed.
*
* @return \GraphQL\Executor\Promise\Adapter\SyncPromise
* A promise that resolves to an array of entities.
*/
public function nodes() : SyncPromise;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConnectionInterface:: |
public | function | Get the edges from the connection. | |
ConnectionInterface:: |
public | function | Get hte nodes for this connection. | |
ConnectionInterface:: |
public | function | Get the page info from the connection. | |
ConnectionInterface:: |
public | function | Specifies the pagination parameters for this query. |