From 4a4bbe2fc0947a8ff17906b4de0204ad5143aa21 Mon Sep 17 00:00:00 2001 From: Valeriy Nayda Date: Tue, 3 Jul 2018 16:28:58 +0300 Subject: [PATCH] GraphQL-116: Wrong category table name resolving --- .../Magento/CatalogGraphQl/Model/Category/LevelCalculator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php b/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php index eb57873850b8..0401e1c42331 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php +++ b/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php @@ -37,7 +37,7 @@ public function calculate(int $rootCategoryId) : int { $connection = $this->resourceConnection->getConnection(); $select = $connection->select() - ->from($connection->getTableName('catalog_category_entity'), 'level') + ->from($this->resourceConnection->getTableName('catalog_category_entity'), 'level') ->where($this->resourceCategory->getLinkField() . " = ?", $rootCategoryId); return (int) $connection->fetchOne($select); }