diff --git a/src/Plugin/GraphQL/DataProducer/Entity/EntityTranslation.php b/src/Plugin/GraphQL/DataProducer/Entity/EntityTranslation.php index e504b5df6..c6b496dce 100644 --- a/src/Plugin/GraphQL/DataProducer/Entity/EntityTranslation.php +++ b/src/Plugin/GraphQL/DataProducer/Entity/EntityTranslation.php @@ -97,7 +97,7 @@ public function __construct(array $configuration, $pluginId, $pluginDefinition, * @return |null */ public function resolve(EntityInterface $entity, $language, ?bool $access, ?AccountInterface $accessUser, ?string $accessOperation) { - if ($entity instanceof TranslatableInterface && $entity->isTranslatable()) { + if ($entity instanceof TranslatableInterface && $entity->isTranslatable() && $entity->hasTranslation($language)) { $entity = $entity->getTranslation($language); $entity->addCacheContexts(["static:language:{$language}"]); // Check if the passed user (or current user if none is passed) has access