Skip to content

Commit d19fdc4

Browse files
ENGCOM-2320: Fix the category tree depth calculation bug #102
- Merge Pull Request magento/graphql-ce#102 from magento/graphql-ce:graphql-fix-the-category-tree-depth-calculation-issue - Merged commits: 1. 9116d82
2 parents ce5eacd + 9116d82 commit d19fdc4

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)