graphql_compose-1.0.0-beta20/src/Plugin/GraphQLCompose/SchemaType/TimeZoneType.php
src/Plugin/GraphQLCompose/SchemaType/TimeZoneType.php
<?php
declare(strict_types=1);
namespace Drupal\graphql_compose\Plugin\GraphQLCompose\SchemaType;
use Drupal\graphql_compose\Attribute\SchemaType;
use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeSchemaTypeBase;
use GraphQL\Type\Definition\CustomScalarType;
/**
* {@inheritdoc}
*/
#[SchemaType(
id: "TimeZone",
)]
class TimeZoneType extends GraphQLComposeSchemaTypeBase {
/**
* {@inheritdoc}
*/
public function getTypes(): array {
$types = [];
$types[] = new CustomScalarType([
'name' => $this->getPluginId(),
'description' => (string) $this->t('A field whose value exists in the standard IANA Time Zone Database.'),
]);
return $types;
}
}
