Get Compare Items
About
The compareItems query retrieves a paginated list of products in the authenticated customer's comparison list. Use this query to:
- Display the customer's product comparison list
- Build comparison tables with product details
- Implement pagination for large comparison lists
- Show compare item counts and status
This query uses cursor-based pagination and returns compare items with their associated product and customer data.
Authentication
This query requires customer authentication:
- Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>Arguments
| Argument | Type | Description |
|---|---|---|
first | Int | Number of items to return per page. |
after | String | Cursor for pagination. Use endCursor from previous response. |
Possible Returns
| Field | Type | Description |
|---|---|---|
edges | [CompareItemEdge!] | Array of compare item edges with cursor and node. |
edges.cursor | String! | Cursor for this edge, used in pagination. |
edges.node | CompareItem! | The compare item object. |
edges.node.id | ID! | IRI identifier (e.g. /api/shop/compare-items/606). |
edges.node._id | Int! | Numeric identifier. |
edges.node.product | Product! | Associated product with id, name, sku, price, etc. |
edges.node.customer | Customer! | Associated customer with id, email, firstName, lastName. |
edges.node.createdAt | String | Timestamp when the item was added. |
edges.node.updatedAt | String | Timestamp when the item was last updated. |
pageInfo | PageInfo! | Pagination metadata. |
totalCount | Int! | Total number of compare items. |

