categoryList
categoryList is a Magento 2 GraphQL query in the Catalog module. Return an array of categories based on the specified filters. It returns [CategoryTree] and is callable anonymously.
Deprecated: Use `categories` instead.
Last verified: against Magento 2.4.9.
Returns
Resolver class
Magento\CatalogGraphQl\Model\Resolver\CategoryList
Cache
identity: Magento\CatalogGraphQl\Model\Resolver\Category\CategoriesIdentity
Arguments
Identifies which Category filter inputs to search for and return.
Specifies the maximum number of results to return at once. The default value is 20.
Specifies which page of results to return. The default value is 1.
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
query {
categoryList {
children { ... }
}
}Variables
{}Related in CatalogGraphQl
Other fields shipped by the same module.
categories
Return a list of categories that match the specified filter.
Catalog · returns CategoryResult
category
DeprecatedSearch for categories that match the criteria specified in the `search` and `filter` attributes.
Catalog · returns CategoryTree
products
Search for products that match the criteria specified in the `search` and `filter` attributes.
Catalog · returns Products
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.