category
category is a Magento 2 GraphQL query in the Catalog module. Search for categories that match the criteria specified in the search and filter attributes. 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\CategoryTree
Cache
identity: Magento\CatalogGraphQl\Model\Resolver\Category\CategoryTreeIdentity
Arguments
The category ID to use as the root of the search.
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 {
category {
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
categoryList
DeprecatedReturn an array of categories based on the specified filters.
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.