MageSmith
QueryCatalog · Magento 2.4.9 Deprecated

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

CategoryTree

Resolver class

Magento\CatalogGraphQl\Model\Resolver\CategoryTree

Cache

identity: Magento\CatalogGraphQl\Model\Resolver\Category\CategoryTreeIdentity

Arguments

id Int

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

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline

Query

query {
  category {
    children { ... }
  }
}

Variables

{}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.