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
}Fields
| Field | Type | Description |
|---|---|---|
productsCount | Int | The total number of products in this product group, not affected by filters. |
seoDescription | String | SEO meta description for this product group. |
seoTitle | String | SEO meta title for this product group. |
seoKeywords | String | SEO meta keywords for this product group. |
id | Int | Unique identifier for this product group. |
title | String | Display name/title of this product group. |
handle | String | Handle (unique string or id) for this product group. |
description | String | HTML-formatted description of this product group. |
image | String | Image URL for this product group. |
productGroups | [ProductGroup] | Child product groups (subcategories) for this product group. |
parent | ProductGroup | Parent product group if it exists, otherwise false. |
breadcrumbs | [ProductGroup] | Breadcrumb trail (list of parent product groups) for this product group. |
products | ProductConnection | Products contained in this product group. |
url | String | Returns the URL for this product group. |
Relationships
ProductGroup represents a hierarchical structure within your store’s product catalog. It can contain child product groups (subcategories) through the productGroups field and reference its parent through the parent field. Each product group maintains a breadcrumb trail of its ancestor product groups through the breadcrumbs field. Product groups are connected to their products through the products field, which returns a ProductConnection that can be filtered and paginated.
Example
{
productGroup(id: 12345) {
id
title
handle
description
seoTitle
seoDescription
seoKeywords
productsCount
image
url
parent {
id
title
}
productGroups {
id
title
handle
}
breadcrumbs {
id
title
handle
}
products(first: 10) {
edges {
node {
id
title
}
}
}
}
}Implements
None