cart.deliverableLine input model before carrying forward code that joins deliverable lines to cart lines by splitting GraphQL IDs. Shopify announced on November 13, 2026 that the model includes cost information and a link to the relevant cart line.On this page
Why this happens
Older fulfillment-constraint examples sometimes create a map of cart.lines by taking the last segment of each ID, then look up deliverableLines using that segment. This assumes two different GraphQL ID types share an implementation-specific suffix. It can appear to work in fixtures while remaining a fragile production dependency.
Fix the implementation
- Check the Function API version and regenerate the extension’s API types.
- Inspect the versioned schema for the deliverable-line cost and cart-line relationship fields available to your Function target.
- Replace string-suffix matching with the schema’s explicit relationship when supported. Query only the fields the Function needs.
- Keep a tested compatibility path if you still deploy to a version without those fields; do not blindly paste queries from a newer schema.
- Make the rule explicit: whether a sale-price comparison, shipping restriction or fulfillment-location policy is being applied to each deliverable line.
Practical example
// Fragile older pattern — do not rely on matching GID suffixes:
const suffix = id => id.split('/').pop();
const line = input.cart.lines.find(x =>
suffix(x.id) === suffix(deliverableLine.id)
);
// Prefer the schema-defined cart-line relationship and
// cost fields on the deliverable-line input in supported versions.
The example highlights the anti-pattern rather than inventing a field name. Use GraphQL schema introspection and generated types to select the exact fields for your deployed API version.
- Inspect the actual generated schema for the deployed Function API version.
- Test a cart with two physical products, one discounted and one full price.
- Test split delivery groups and a cart containing a non-deliverable item.
- Use fixtures with deliberately different cart-line and deliverable-line ID suffixes; ensure the policy still selects the intended items.
- Verify the resulting eligible fulfillment locations and checkout behavior.

