Hi,
what exactly do I have to change here so that I can query the variantmetafield correctly?
fetch('https://xxxx.myshopify.com/api/2025-04/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Shopify-Storefront-Access-Token': 'xxx',
},
body: JSON.stringify({
query: `query Products {
products(first: 1, query: "metafields.itemid.itemid:'1947'") {
edges {
node {
id
title
}
}
}
}`,
}),
})
.then((response) => response.json())
.then((data) => {
console.log('prod:', data);
})
.catch((error) => console.error('Fehler:', error));
Thanks