Docs
Dashboard

Category

Object

Represents a category, encapsulating all information required to display and manage categories across storefronts and sales channels.

Each category includes core details such as title, description, and associated products. Categories can be organized hierarchically to create a structured navigation experience for customers.

#

Fields


ancestors
[Category!]!

The ancestors of the category.

children
[Category!]!

The direct children of the category.

childrenCount
Long!

The number of direct children of the category.

descendants
[Category!]!

The descendants of the category.

descendantsCount
Long!

The number of descendants of the category.

id
ID!

The ID of the category.

level
Int!

The level of the category. Root categories have a level of 0, their direct children have a level of 1, and so on.

metafields
[Metafield!]!

A list of metafields associated with the category. If a metafield definition has no explicit assignment for this category, the definition’s default value is returned.

name
String!

The name of the category.

parent
Category

The parent category of the category.

path
String!

The path associated with this category.

productVariants
ProductVariantConnection!

A paged list of product variants whose products are associated with the category.

products
ProductsConnection!

List of products in the collection.

productsCount
Long!

The number of products that are associated with the category.

slug
String!

The slug of the category.

#

Queries


Returns a list of categories.

Gets a single Category by its ID, slug, or site path.