ProductTaxonomy
Describes a product taxonomy, providing structured categorization and associated attributes for a product.
Type Definition
type ProductTaxonomy {
category: ProductTaxonomyCategory
attributes: [ProductTaxonomyAttribute]
}Fields
| Field | Type | Nullable | Description | Relationship |
|---|---|---|---|---|
| category | ProductTaxonomyCategory | Yes | Returns the category. | Links to the product’s category |
| attributes | [ProductTaxonomyAttribute] | Yes | Returns the attributes. | List of taxonomy attributes |
Relationships
- category: Connects the product taxonomy to a single
ProductTaxonomyCategoryobject, representing the category classification of the product. - attributes: Connects to a list of
ProductTaxonomyAttributeobjects, representing various attributes associated with the taxonomy.
Usage Examples
Basic Query
query {
product(id: 12345) {
taxonomy {
category {
id
name
}
attributes {
id
name
value
}
}
}
}Field Selection
query {
product(id: 12345) {
taxonomy {
category {
name
}
attributes {
name
}
}
}
}Nested Queries
query {
product(id: 12345) {
taxonomy {
category {
id
name
description
}
attributes {
id
name
value
description
}
}
}
}Filtering and Sorting
Note: The ProductTaxonomy type itself does not define filtering, sorting, or pagination fields. Filtering and sorting should be applied at the query level on the parent objects or lists that include ProductTaxonomy.
Implements
This type does not implement any interfaces.
Connections
No direct connections are defined on ProductTaxonomy. It is typically accessed as a nested object within a Product.
Related Types
- ProductTaxonomyCategory: Represents the category classification linked via the
categoryfield. - ProductTaxonomyAttribute: Represents attributes linked via the
attributesfield.
Best Practices
- Query only the fields you need within
categoryandattributesto optimize response size. - When querying multiple products, consider batching requests or using pagination on the product list to manage performance.
- Use nested queries to access detailed category and attribute information in a single request.
Notes
- The API currently requires no authentication; however, this may change in future versions.
categoryandattributesfields are optional and may returnnullif no taxonomy data is available for a product.- Since
attributesis a list, be mindful of potentially large datasets when querying all attributes. - No computed or derived fields are defined on
ProductTaxonomy. - No field arguments are defined on this type.
Last updated on