Issue: In Storefront API responses, some order and checkout line items return variant: null even when the product/variant appears to exist and be active.
Expected behavior: Variant details should be present on line items for available variants. Shopify docs note that if a variant is deleted, REST may return only the variant ID while other details are null, and GraphQL may return variant as null.
Observed behavior: Multiple users report variant is null for items that still exist, are active, and are available to the sales channel. Other fields (e.g., title) still return data. In some cases, the ProductVariant node can be queried successfully via Storefront API, but the line item’s variant field is null. Occurs inconsistently (“random” variants).
Evidence: Screenshots and a code snippet show lineItems with variant: null after checkoutCreate.
Status: No confirmed root cause or fix. Initial hypothesis (deleted items) does not explain all cases. Users are asking for an update; issue remains unresolved.
Summarized with AI on December 13.
AI used: gpt-5.
I am using Storefront API to get the order history of the users, then I list the different line_items. But some line_items have the variants object to null, I need this object because it contains several information.
Thank you for your answer but this is not the case for all products. Some old products are no longer available, but others recent products are still available but with an empty object variant.
We also are seeing this when using the checkoutCreate storefront mutation, no errors no issues, but this is what is returned for the checkout lineItems: