# ProductGroup Represents a product group in the store, including its metadata, SEO fields, relationships, and available filters for GraphQL queries. ## Type Definition ```graphql 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 | 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 | The products in this product group, supporting sorting and filtering. | | `url` | String | Returns the URL for this product group. | | `metafields` | [Metafield]! | Metafields stored on this resource. | | `metafield` | Metafield | A single metafield by namespace and key. | ## 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 ```graphql 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. ## Related Types - [ProductGroup](/reference/storefront/1.3.0/objects/product-group) - [ProductConnection](/reference/storefront/1.3.0/connections/product-connection) - [Metafield](/reference/storefront/1.3.0/objects/metafield)