Skip to Content

ProductTaxonomyAttribute

Describes a product taxonomy attribute.

Type Definition

type ProductTaxonomyAttribute { id: Int handle: String name: String translatedName: String type: String values: [ProductTaxonomyValue] }

Fields

FieldTypeNullableDescriptionRelationship
idIntYesReturns the id.
handleStringYesReturns the handle.
nameStringYesReturns the name.
translatedNameStringYesReturns the translated name.
typeStringYesReturns the type.
values[ProductTaxonomyValue]YesReturns the values.Related to ProductTaxonomyValue

Relationships

  • values: An optional list of ProductTaxonomyValue objects representing the possible values for this taxonomy attribute.
  • This type is used by:
    • Filter.taxonomyAttribute
    • ProductOption.taxonomyAttribute

These relationships allow you to traverse from a taxonomy attribute to its possible values and to access taxonomy attributes associated with filters and product options.

Usage Examples

Basic Query

{ productTaxonomyAttribute { id handle name translatedName type } }

Field Selection

{ productTaxonomyAttribute { name translatedName type } }

Nested Queries

{ productTaxonomyAttribute { id name values { id name } } }

Filtering and Sorting

Currently, the ProductTaxonomyAttribute type does not expose built-in filtering, sorting, or pagination arguments directly on its fields. Filtering and sorting should be applied at the query level where this type is used, such as within Filter or ProductOption queries.

Implements

This type does not implement any GraphQL interfaces.

Connections

No connection fields are defined on ProductTaxonomyAttribute.

  • ProductTaxonomyValue: Represents individual values associated with a taxonomy attribute. Accessible via the values field.

Best Practices

  • When querying values, select only the fields you need to optimize response size.
  • Use the handle and name fields to display taxonomy attributes in user interfaces.
  • Leverage translatedName to support internationalization.
  • Since fields are optional, always check for null values in your client code to avoid runtime errors.

Notes

  • The API currently requires no authentication, but this may change in future versions.
  • Fields like id, handle, and name may be null depending on the data availability.
  • There are no computed or derived fields on this type.
  • No field arguments are defined for this type.
  • Be mindful that large lists in values may impact query performance; paginate or limit results at the query level where applicable.
Last updated on