Skip to content

Commit b4fc10d

Browse files
author
Stanislav Idolov
authored
ENGCOM-2320: Fix the category tree depth calculation bug #102
2 parents b74a600 + d19fdc4 commit b4fc10d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Diff for: app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
class CategoryTree
2525
{
2626
/**
27-
* In depth we need to calculate only children nodes, so 2 first wrapped nodes should be ignored
27+
* In depth we need to calculate only children nodes, so the first wrapped node should be ignored
2828
*/
29-
const DEPTH_OFFSET = 2;
29+
const DEPTH_OFFSET = 1;
3030

3131
/**
3232
* @var CollectionFactory

Diff for: dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ public function testCategoriesTree()
6363
children {
6464
level
6565
id
66-
children {
67-
id
68-
}
6966
}
7067
}
7168
}

0 commit comments

Comments
 (0)