ProductConnection
A connection to a list of Product items. This connection type provides paginated access to products with support for filtering and metadata about the result set.
Connection Structure
type ProductConnection {
edges: [ProductEdge]
nodes: [Product]
pageInfo: PageInfo
totalCount: Int
filters: [Filter]
}Pagination Arguments
PageInfo Structure
The pageInfo object contains metadata about pagination state and includes the following fields:
hasNextPage(Boolean): Indicates whether there are more items after the current pagehasPreviousPage(Boolean): Indicates whether there are items before the current pagestartCursor(String): The cursor of the first item in the current pageendCursor(String): The cursor of the last item in the current page
Example
query GetProducts {
products(first: 10, after: "eyJvZmZzZXQiOjB9") {
edges {
node {
id
name
}
cursor
}
nodes {
id
name
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalCount
filters {
name
values
}
}
}Edge Type
The ProductEdge type represents a single item in the connection and contains:
node(Product): The product item itselfcursor(String): An opaque cursor value used for pagination, allowing you to request items before or after this edge