Can't Get Product Metafields using StoreFront GraphQL API.

Highlighted
New Member
1 0 0

I have been following this tutorial.

https://shopify.dev/tutorials/retrieve-metafields-with-storefront-api

And added MetaFields using custom app to my product.

But This query doesn't return any metafields while I have 2 metafields on this product for relavant handle.

What I am doing wrong here?

Any help would be appreciated.

 

{
  productByHandle(handle: "xxx-handle") {
    id
    title
    handle
    productType
    metafields(first: 5) {
      edges {
        node {
          key
          value
        }
      }
    }
  }
}

 

0 Likes