ProductGroup
Represents a product group in the store, including its metadata, SEO fields, relationships, and available filters for GraphQL queries.
Type Definition
type ProductGroup {
productsCount: Int
seoDescription: String
seoTitle: String
seoKeywords: String
id: Int
title: String
handle: String
description: String
image: String
productGroups: [ProductGroup]
parent: ProductGroup
breadcrumbs: [ProductGroup]
products: ProductConnection
url: String
metafields: [Metafield]!
metafield: Metafield
}Fields
Relationships
ProductGroup represents a hierarchical structure of product categories within the store. It can contain child product groups as subcategories through the productGroups field and maintain a reference to its parent product group through the parent field. The breadcrumb trail is available through breadcrumbs, which provides the complete hierarchy path. Each product group contains products through the products field, which returns a ProductConnection that supports sorting and filtering. Product groups also support custom metadata through metafields, allowing for extensible data storage on the resource.
Example
query {
productGroup(id: 12345) {
id
title
handle
description
image
url
productsCount
seoTitle
seoDescription
seoKeywords
parent {
id
title
}
productGroups {
id
title
handle
}
breadcrumbs {
id
title
handle
}
products(first: 10) {
edges {
node {
id
title
}
}
}
metafields {
namespace
key
value
}
}
}Implements
This type does not implement any interfaces.