Skip to Content

ProductGroupConnection

A connection to a list of ProductGroup items.

Connection Structure

type ProductGroupConnection { edges: [ProductGroupEdge] nodes: [ProductGroup] pageInfo: PageInfo! totalCount: Int }

Pagination Arguments

ArgumentTypeDescription
firstIntReturns the first n items from the list
lastIntReturns the last n items from the list
beforeStringReturns items before the specified cursor
afterStringReturns items after the specified cursor

PageInfo Structure

The pageInfo object contains pagination metadata about the connection. It provides information about whether additional pages exist and supplies cursor values for navigating between pages. The pageInfo field is required and always returns a PageInfo object with fields including hasNextPage, hasPreviousPage, startCursor, and endCursor.

Example

query { productGroups(first: 10, after: "eyJpZCI6IDEwMH0=") { edges { cursor node { id name } } nodes { id name } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount } }

Edge Type

The ProductGroupEdge type represents an individual item in the connection. Each edge contains a node field that holds the actual ProductGroup object, and a cursor field that provides an opaque string for pagination purposes. The cursor can be used in subsequent queries with the before or after arguments to navigate through the list.