From eb7f93252a2052cab6cabbb1b42c2d91eb4ee8fa Mon Sep 17 00:00:00 2001 From: Al Munnings <al.munnings@gmail.com> Date: Wed, 12 Feb 2025 09:15:28 +1100 Subject: [PATCH] Issue #3492332: Add support for Storage entities (allie-micka) --- .../GraphQLCompose/EntityType/Group.php | 2 ++ .../GraphQLCompose/EntityType/LibraryItem.php | 2 ++ .../GraphQLCompose/EntityType/Paragraph.php | 2 ++ .../GraphQLCompose/EntityType/Storage.php | 31 +++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 src/Plugin/GraphQLCompose/EntityType/Storage.php diff --git a/src/Plugin/GraphQLCompose/EntityType/Group.php b/src/Plugin/GraphQLCompose/EntityType/Group.php index b5d218dc..c8d0827a 100644 --- a/src/Plugin/GraphQLCompose/EntityType/Group.php +++ b/src/Plugin/GraphQLCompose/EntityType/Group.php @@ -9,6 +9,8 @@ use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeEntityTypeBase; /** * {@inheritdoc} * + * @see https://www.drupal.org/project/group + * * This is mostly a placeholder entity type. * Further works on the groups module is assumed in the future. * Probably via another contrib module. diff --git a/src/Plugin/GraphQLCompose/EntityType/LibraryItem.php b/src/Plugin/GraphQLCompose/EntityType/LibraryItem.php index 0eec2525..a96679bb 100644 --- a/src/Plugin/GraphQLCompose/EntityType/LibraryItem.php +++ b/src/Plugin/GraphQLCompose/EntityType/LibraryItem.php @@ -9,6 +9,8 @@ use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeEntityTypeBase; /** * {@inheritdoc} * + * @see https://www.drupal.org/project/paragraphs + * * @GraphQLComposeEntityType( * id = "paragraphs_library_item", * base_fields = { diff --git a/src/Plugin/GraphQLCompose/EntityType/Paragraph.php b/src/Plugin/GraphQLCompose/EntityType/Paragraph.php index 2fde01bb..c225beda 100644 --- a/src/Plugin/GraphQLCompose/EntityType/Paragraph.php +++ b/src/Plugin/GraphQLCompose/EntityType/Paragraph.php @@ -9,6 +9,8 @@ use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeEntityTypeBase; /** * {@inheritdoc} * + * @see https://www.drupal.org/project/paragraphs + * * @GraphQLComposeEntityType( * id = "paragraph", * prefix = "Paragraph", diff --git a/src/Plugin/GraphQLCompose/EntityType/Storage.php b/src/Plugin/GraphQLCompose/EntityType/Storage.php new file mode 100644 index 00000000..a7251ee7 --- /dev/null +++ b/src/Plugin/GraphQLCompose/EntityType/Storage.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\graphql_compose\Plugin\GraphQLCompose\EntityType; + +use Drupal\graphql_compose\Plugin\GraphQLCompose\GraphQLComposeEntityTypeBase; + +/** + * {@inheritdoc} + * + * @see https://www.drupal.org/project/storage + * + * @GraphQLComposeEntityType( + * id = "storage", + * prefix = "Storage", + * base_fields = { + * "langcode" = {}, + * "created" = {}, + * "changed" = {}, + * "published_at" = {}, + * "status" = {}, + * "name" = { + * "field_type" = "entity_label", + * }, + * }, + * ) + */ +class Storage extends GraphQLComposeEntityTypeBase { + +} -- GitLab