I am using the storefront API with hydrogen and using the cartCreate mutation. I have 20 line items that I’m passing to cartCreate and there is one line item that errors out:
‘The merchandise with id gid://shopify/ProductVariant/45060060774721 does not exist.’
This item exists in my store and I don’t see anything wrong with it. Would there be any reason the storefront api wouldn’t see it?
I just realized that the ProductVariant ID that was used by the CartLineItem in my cart was non-existent. I have no idea where this ProductVariant ID came from. When doing a query for a productByHandle, I get this ProductVariant ID :
Figured it out. It was something I did. I have a custom Shopify App (using Admin API) that regularly updates the price of the products and every time it did an update, it changed the ProductVariantID of the products which wasn’t intended. I fixed it to make sure I passed the ProductVariantID when doing a productUpdate mutation. Silly me.