diff --git a/vendor/magento/module-catalog-graph-ql/Model/Resolver/CategoryList.php b/vendor/magento/module-catalog-graph-ql/Model/Resolver/CategoryList.php index e2b045c36f4..4dde51578b7 100644 --- a/vendor/magento/module-catalog-graph-ql/Model/Resolver/CategoryList.php +++ b/vendor/magento/module-catalog-graph-ql/Model/Resolver/CategoryList.php @@ -78,6 +78,10 @@ class CategoryList implements ResolverInterface } try { $processedArgs = $this->argsSelection->process($info->fieldName, $args); + // CategoryList query doesn't have pagination and should return all data. + // Otherwise, the default page size will be set. + $processedArgs['pageSize'] = 0; + $processedArgs['currentPage'] = 0; $filterResults = $this->categoryFilter->getResult($processedArgs, $store, [], $context); $rootCategoryIds = $filterResults['category_ids']; @@ -117,9 +121,6 @@ class CategoryList implements ResolverInterface $attributeNames, $context ); - if (empty($categoryTree)) { - continue; - } $fetchedCategories[] = current($this->extractDataFromCategoryTree->execute($categoryTree)); }