From af73c1873ecde29a6c2dc2b2f1d444365ef92293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Jamu=C5=82a?= <37102695+Sztig@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:20:45 +0100 Subject: [PATCH] fixed return in updateDomainContent method to Item (#75) --- src/lib/Resolver/DomainContentMutationResolver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Resolver/DomainContentMutationResolver.php b/src/lib/Resolver/DomainContentMutationResolver.php index d005105..fa1fade 100644 --- a/src/lib/Resolver/DomainContentMutationResolver.php +++ b/src/lib/Resolver/DomainContentMutationResolver.php @@ -55,7 +55,7 @@ public function __construct( $this->itemFactory = $relatedContentItemFactory; } - public function updateDomainContent($input, Argument $args, $versionNo, $language): RepositoryValues\Content\Content + public function updateDomainContent($input, Argument $args, $versionNo, $language): Item { if (isset($args['id'])) { $idArray = GlobalId::fromGlobalId($args['id']); @@ -136,7 +136,7 @@ public function updateDomainContent($input, Argument $args, $versionNo, $languag throw new UserError('You are not authorized to publish this version'); } - return $this->getContentService()->loadContent($contentDraft->id); + return $this->itemFactory->fromContent($this->getContentService()->loadContent($contentDraft->id)); } public function createDomainContent($input, $contentTypeIdentifier, $parentLocationId, $language): Item