App reviews, troubleshooting, and recommendations
I'm trying to retrieve the ID of a metafield of a product variant so I can use later to update the metafield of that product variant, however I haven't been able to see the result.
Here is my attempt:
const myQuery = await client.query({
data: `query
{
product(id: "gid://shopify/Product/8547626647858") {
variants(first: 15)
{
edges
{
node {
id
sku
}
}
}
}
}`,
});
console.log("Hello: "+myQuery.response.data);
How can I log the ID because currently the response returns undefined!
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024