PreviousPriceConnection
A connection to a list of PreviousPrice items. This connection type provides paginated access to historical price data associated with product variants.
Connection Structure
type PreviousPriceConnection {
edges: [PreviousPriceEdge]
nodes: [PreviousPrice]
pageInfo: PageInfo
totalCount: Int
}Pagination Arguments
PageInfo Structure
The pageInfo object contains information about the pagination state of the connection. It includes fields such as hasNextPage (indicating whether more items exist after the current page), hasPreviousPage (indicating whether items exist before the current page), startCursor (the cursor of the first item in the current page), and endCursor (the cursor of the last item in the current page). This information allows clients to determine pagination boundaries and construct subsequent queries.
Example
query {
productVariant(id: 12345) {
previousPrices(first: 10, after: "eyJpZCI6IDEyMzQ1fQ==") {
edges {
node {
id
price
startDate
endDate
}
cursor
}
nodes {
id
price
startDate
endDate
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalCount
}
}
}Edge Type
The edge type for this connection is PreviousPriceEdge, which wraps individual PreviousPrice items. Each edge contains a node field that holds the actual PreviousPrice object and a cursor field that represents an opaque string used for pagination. The cursor can be used in subsequent queries with the before or after arguments to navigate through the list.