I am using Shopify's GraphQL Tool to verify that my query is correct and it response exactly what I would expect to see
Here is the code that I'm using on my storefront.
const query = `{
products(first: 1, query: "sku:[DUMMY_SKU_HERE]") {
edges {
node {
id
handle
onlineStoreUrl
title
images(first: 1) {
edges {
node {
transformedSrc(maxWidth: 100, maxHeight: 100)
}
}
}
}
}
}
}`;
fetch("https://dummystore.myshopify.com/api/2020-07/graphql", {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/graphql",
"X-Shopify-Storefront-Access-Token": access_token,
},
body: query,
})
.then((response) => response.json())
.then((response) => {
console.log(response);
})
.catch((error) => console.error(error));
and here is the very incorrect response that I'm getting from Shopify. Not only is it incorrect, but no matter what SKU I pass in for my query it returns the exact same product data.