Read a cart line's `viewKey` from the `CartLine` type
Shopify developer change
MerchantDiff detected this entry in Shopify's official developer changelog on June 12, 2026.
This Shopify update is categorized as API, New, Storefront API, 2026-07.
What changed
The CartLine type now exposes a viewKey field, so you can correlate a returned cart line with the viewKey you sent to cartLinesUpdate and cartLinesRemove. What's new CartLine.viewKey returns the same viewKey your Liquid storefront renders, alongside the existing UUID id. How to use Previously, identifying a line by viewKey was input-only: you could send a viewKey, but the response returned a UUID id with no viewKey to map back. You can now read it directly off the line. query CartLines($cartId: ID!) { cart(id: $cartId) { lines(first: 10) { edges { node { id viewKey } } } } } The field reads a value the cart already stores, so existing UUID-based correlation keeps working unchanged.
Who is affected
Apps and storefronts using the affected Storefront API surface should review this change.
What action may be needed
Review whether the new capability is relevant to your app. If you plan to use it, test the affected API or workflow before adopting it in production.
Use the official Shopify entry below as the source of truth for technical implementation details, affected APIs, migration instructions and deadlines.
Want the actionable version?
MerchantDiff monitors Shopify API changes, deprecations, deadlines and ecosystem updates, then turns them into developer-focused release intelligence: what changed, who is affected and what action may be needed.
Get MerchantDiff →