Skip to Content

productGroups

Search for product groups in the catalog

Authentication

Public Access: Accessible with the public API key

Query Structure

{ productGroups( query: String parentId: Int first: Int after: String last: Int before: String sortKey: ProductGroupSortKey reverse: Boolean ) { edges { node { id name } cursor } nodes { id name } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount } }

Arguments

ArgumentTypeRequiredDescription
queryStringNoSearch query string to filter product groups
parentIdIntNoFilter by parent category ID
firstIntNoReturns the first n elements
afterStringNoReturns elements after cursor for pagination
lastIntNoReturns the last n elements
beforeStringNoReturns elements before cursor for pagination
sortKeyProductGroupSortKeyNoThe key to sort product groups by
reverseBooleanNoReverse the order of the underlying list

Return Type

ProductGroupConnection - A connection to a list of ProductGroup items with pagination support.

Example

query { productGroups( query: "electronics" first: 10 sortKey: NAME ) { edges { node { id name } cursor } pageInfo { hasNextPage endCursor } totalCount } }