Docs
Dashboard

Attribute

Object

Defines a product attribute in Thor, such as color, size, or material, that describes a specific aspect of a product. Attributes are used to distinguish between different variants of the same product—each unique combination of attribute values represents a distinct variant. This enables flexible filtering, grouping, and enrichment of product data across the catalog.

#

Fields


id
ID!

The unique identifier of the attribute.

metadata
[MetadataItem!]!

Gets the metadata associated with the attribute.

metafields
[Metafield!]!

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

name
String!

The name of the attribute.

references
ProductConnection!

Products to which this attribute is assigned. These assignments prevent the attribute from being deleted, even when none of its values are selected by a product variant.

referencesCount
Long!

The number of products to which this attribute is assigned.

translations
[Translation!]!

Translations registered for this product attribute.

type
ProductAttributeType!

The type of the attribute.

Possible enum values
  • SWATCH

    Presents the attribute value as a visual swatch, such as a color or pattern.

  • TEXT

    Presents the attribute value as text.

values
AttributeValueConnection!

A list of values associated with the attribute.

valuesCount
Long!

The number of values that are associated with the attribute.

#

Queries


Gets a product attribute by its ID.

Retrieves a paginated list of product attributes.

#

Mutations


Creates a new product attribute.

Deletes a product attribute by its identifier.

Updates an existing product attribute.

Adds multiple values to an existing product attribute.

Deletes multiple values from an existing product attribute.

Updates multiple values of an existing product attribute.