Skip to content

Catalog Category — Detail (GraphQL)

GraphQL item query that returns a single category by its IRI, including the full translations array (every locale present in the database) and the list of filterable attribute IDs configured for the category.

This is the query to call when an admin needs complete metadata for a category — e.g. when pre-populating the edit form in Catalog → Categories.

Operation

OperationType
adminCategoryQuery (item)

Arguments

ArgumentTypeRequiredDescription
idID!YesAPI Platform IRI of the category (e.g. "/api/admin/catalog/categories/7")

Take the IRI straight from the id of an adminCategories edge node, or build it as /api/admin/catalog/categories/<numericId>. A tree node's id will not work — that one resolves to /api/admin/admin_category_trees/<id>, so use its _id to build the path.

Node Fields

FieldTypeDescription
idIDAPI Platform IRI (e.g. /api/admin/catalog/categories/7)
_idIntRaw category ID
nameStringCategory name in the current app locale
slugStringURL slug in the current app locale
statusInt1 = enabled, 0 = disabled
positionIntDisplay order position
parentIdIntParent category ID; null for root nodes
displayModeStringCategory display mode (e.g. products_and_description)
logoUrlStringStorage URL for the category logo; null if not set
bannerUrlStringStorage URL for the category banner; null if not set
descriptionStringCategory description in the current app locale
localeStringApp locale used for top-level scalar fields
createdAtStringISO 8601 creation timestamp
updatedAtStringISO 8601 last-update timestamp
translationsscalar (JSON array)All locale translations (see below)
filterableAttributeIdsscalar (JSON array)Integer IDs of filterable attributes configured for this category

translations item shape

translations is returned as a plain JSON array (scalar in GraphQL). Each element corresponds to one locale row in category_translations:

KeyTypeDescription
localestringLocale code (e.g. en, fr)
namestring|nullCategory name in this locale
slugstring|nullURL slug in this locale
descriptionstring|nullDescription in this locale
metaTitlestring|nullSEO meta title
metaDescriptionstring|nullSEO meta description
metaKeywordsstring|nullSEO meta keywords

Errors

ConditionResult
Unknown or deleted idHTTP 200 with Category not found. in errors[] and null in data.adminCategory
Missing or invalid tokenHTTP 401 with {"message": "Unauthenticated.", "error": "unauthenticated"} — rejected by the transport before GraphQL runs

Working With This Query

  • translations and filterableAttributeIds are JSON scalars. Select each as a bare field — a sub-selection is a schema error. The whole structure comes back in one piece.
  • translations carries one entry per stored locale row, not just the requested one, so a multi-locale store returns them all. Unset text fields come back as the empty string "", not null.
  • The top-level name, slug, and description duplicate the requested locale's entry. They are a shortcut, not extra data — locale tells you which entry they came from.
  • filterableAttributeIds is a flat integer array. [] means none are configured; it is the layered-navigation attribute set for this category, not the products' attributes.
  • The id argument is the IRI, not the number. Build it as /api/admin/catalog/categories/<_id> or pass a listing edge's id straight through.

Released under the MIT License.