Skip to content

Commit d15dd2f

Browse files
authored
Merge pull request #239 from wunderio/NEX-165
NEX-165: Add patch to graphql_compose to allow for nodes with unpublished translations
2 parents 8f9d35c + c253401 commit d15dd2f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drupal/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@
139139
"drupal/graphql" : {
140140
"drupal-graphql#1323: Add check for translation (from Github)": "https://patch-diff.githubusercontent.com/raw/drupal-graphql/graphql/pull/1388.patch"
141141
},
142+
"drupal/graphql_compose" : {
143+
"Querying for translations of a node with one or more unpublished translations causes fatal error (d.org issue #3464624)": "./patches/graphql_compose_unpublished_translations.patch"
144+
},
142145
"drupal/core": {
143146
"Add support for the experimental recipes functionality (local patch)": "./patches/recipe-10.2.x.patch",
144147
"Fix error when enabling the language module via recipe": "https://www.drupal.org/files/issues/2019-11-19/drupal.8.8.x-3002532-20.patch",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Plugin/GraphQLCompose/SchemaType/TranslationType.php b/src/Plugin/GraphQLCompose/SchemaType/TranslationType.php
2+
index b9db00fe647fbda8b371c9fa4dafa644bb87e0a9..4a6d967c38ed8b82c5723115fef00c1722054636 100644
3+
--- a/src/Plugin/GraphQLCompose/SchemaType/TranslationType.php
4+
+++ b/src/Plugin/GraphQLCompose/SchemaType/TranslationType.php
5+
@@ -71,7 +71,7 @@ class TranslationType extends GraphQLComposeSchemaTypeBase {
6+
'fields' => function () {
7+
return [
8+
'translations' => [
9+
- 'type' => Type::nonNull(Type::listOf(Type::nonNull(static::type($this->getPluginId())))),
10+
+ 'type' => Type::nonNull(Type::listOf(static::type($this->getPluginId()))),
11+
'description' => (string) $this->t('Available translations for content.'),
12+
],
13+
];

0 commit comments

Comments
 (0)