Hello all,
I am trying to build a Gatsby + Shopify site and I'm using the shopify buy sdk. My goal is to dynamically fetch the product to make sure it's available for checkout. I have my shopify-buy client configured.
I have a function:
const fetchProduct = async () => {
// in this case, variant.shopifyId = Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zODA1ODQ1NjA4ODczNg==
const product = await client.product.fetch(variant.shopifyId)
console.log(product)
}
However when I log `product`, I don't seem to get the actual product data, i get a GraphModel with the following:
I'm not too sure what I'm doing wrong here so any help would be greatly appreciated
Thanks!
User | Count |
---|---|
15 | |
8 | |
8 | |
8 | |
6 |