Skip to content

Commit 1f6b899

Browse files
committed
B2B-2469: Improve category children loading
- style fix
1 parent b567c48 commit 1f6b899

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

app/code/Magento/CatalogGraphQl/Model/Category/CategoryFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function getResult(array $criteria, StoreInterface $store, array $attribu
8484
->columns(
8585
'e.entity_id'
8686
);
87+
$collection->setOrder('entity_id');
8788

8889
$categoryIds = $collection->load()->getLoadedIds();
8990

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@
3535
*/
3636
class CategoryTree
3737
{
38-
/**
39-
* In depth we need to calculate only children nodes, so the first wrapped node should be ignored
40-
*/
41-
private const DEPTH_OFFSET = 1;
42-
4338
/**
4439
* @var CollectionFactory
4540
*/
@@ -55,11 +50,6 @@ class CategoryTree
5550
*/
5651
private $depthCalculator;
5752

58-
/**
59-
* @var LevelCalculator
60-
*/
61-
private $levelCalculator;
62-
6353
/**
6454
* @var MetadataPool
6555
*/
@@ -74,22 +64,19 @@ class CategoryTree
7464
* @param CollectionFactory $collectionFactory
7565
* @param AttributesJoiner $attributesJoiner
7666
* @param DepthCalculator $depthCalculator
77-
* @param LevelCalculator $levelCalculator
7867
* @param MetadataPool $metadata
7968
* @param CollectionProcessorInterface $collectionProcessor
8069
*/
8170
public function __construct(
8271
CollectionFactory $collectionFactory,
8372
AttributesJoiner $attributesJoiner,
8473
DepthCalculator $depthCalculator,
85-
LevelCalculator $levelCalculator,
8674
MetadataPool $metadata,
8775
CollectionProcessorInterface $collectionProcessor
8876
) {
8977
$this->collectionFactory = $collectionFactory;
9078
$this->attributesJoiner = $attributesJoiner;
9179
$this->depthCalculator = $depthCalculator;
92-
$this->levelCalculator = $levelCalculator;
9380
$this->metadata = $metadata;
9481
$this->collectionProcessor = $collectionProcessor;
9582
}

0 commit comments

Comments
 (0)