Docs
Dashboard

Category

Object

Represents a grouping of products within Thor Commerce, enabling merchants to organize and showcase items across storefronts and sales channels. Categories can be defined manually or dynamically via rules based on product attributes, tags, or metadata. Each category supports hierarchical relationships, custom fields, and localization to optimize navigation and personalize the shopping experience.

#

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 unique identifier of the category.

level
Int!

Returns the level of the category in the category tree.

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!

Returns the path of the category in the category tree.

products
ProductConnection!

Retrieves a paged list of products associated with the category.

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.

Returns a Category by its ID, slug, or site path.

#

Mutations


Creates a new category

Deletes a category by its ID.

Reorders products within a category.

Updates an existing category.