graphql_compose-1.0.0-beta20/modules/graphql_compose_edges/src/Plugin/GraphQLCompose/SchemaType/CursorType.php
modules/graphql_compose_edges/src/Plugin/GraphQLCompose/SchemaType/CursorType.php
<?php
declare(strict_types=1);
namespace Drupal\graphql_compose_edges\Plugin\GraphQLCompose\SchemaType;
use Drupal\graphql_compose\Attribute\SchemaType;
use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeSchemaTypeBase;
use GraphQL\Type\Definition\CustomScalarType;
/**
* {@inheritdoc}
*/
#[SchemaType(
id: "Cursor",
)]
class CursorType extends GraphQLComposeSchemaTypeBase {
/**
* {@inheritdoc}
*/
public function getTypes(): array {
$types = [];
$types[] = new CustomScalarType([
'name' => $this->getPluginId(),
'description' => (string) $this->t('A cursor for use in pagination.'),
]);
return $types;
}
}
