Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Dear Shopify Community,
I'm currently busy with setting up the queries for the cart of a customer.
I want to get the products from the cart. My query has these fields: cart->lines->edges->node->merchandise-> product.
The query works and I get my data. But when I try to get to the merchandise part, there are no options to select .onProductVariant (just like at android). I can only call .self, because of this I can't get the products shown in the view. (see image)
Let me know if you need more information.
Kind regards
You need to make sure in your actual Storefront GraphQL query you're including the fields, should look something like this:
query cart($id: ID!) {
cart(id: $id) {
lines(first: 50) {
edges {
node {
id
quantity
merchandise {
... on ProductVariant {
title
product {
title
}
}
}
}
}
}
}
}
Hi C10s,
My query looks like this:
But unfortunately, it is still not possible to reach the .onproductVariant.