From 3b04c9406433c73e9327fbe92dcd61c8b40ec74d Mon Sep 17 00:00:00 2001 From: Valeriy Nayda Date: Wed, 3 Oct 2018 12:36:02 +0300 Subject: [PATCH] GraphQL-121: Fix regexp when filter by root category id -- fixes after mainline merge --- .../Products/DataProvider/ExtractDataFromCategoryTree.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php index 470ad721ab213..ac8d5709c85b3 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php @@ -44,6 +44,7 @@ public function execute(\Iterator $iterator): array $iterator->next(); $nextCategory = $iterator->current(); $tree[$category->getId()] = $this->categoryHydrator->hydrateCategory($category); + $tree[$category->getId()]['model'] = $category; if ($nextCategory && (int) $nextCategory->getLevel() !== (int) $category->getLevel()) { $tree[$category->getId()]['children'] = $this->execute($iterator); }