graphql_compose-1.0.0-beta20/src/Plugin/GraphQLCompose/SchemaType/UntypedStructuredDataType.php
src/Plugin/GraphQLCompose/SchemaType/UntypedStructuredDataType.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: "UntypedStructuredData",
)]
class UntypedStructuredDataType extends GraphQLComposeSchemaTypeBase {
/**
* {@inheritdoc}
*/
public function getTypes(): array {
$types = [];
$types[] = new CustomScalarType([
'name' => $this->getPluginId(),
'description' => (string) $this->t('Untyped structured data. Eg JSON, configuration, settings, attributes.'),
]);
return $types;
}
}
