Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I can use this query in the Shopify graphQL App, but when I use in my headless channel with react-native, the metafields return null:
{
products(first: 10) {
edges {
node {
id
title
featuredImage {
url
altText
}
handle
metafields(
identifiers: [
{namespace: "global", key: "xxxxx_duration"},
{namespace: "global", key: "xxxxx_id"},
{namespace: "global", key: "circuit_1"},
{namespace: "global", key: "source_id"}
]
) {
namespace
key
value
}
}
}
}
}
Note: Actually metafield keys have been anonymized in this post.
I am trying to use API version 2024-04 and have NOT created a MetafieldStorefrontVisibility record manually, because it is deprecated and the metafields definitions all have
Definition is available in your Online Store, through Liquid, and the Storefront API option checked
which I think means the visibility should be set already.
Do I still need to manually create a MetafieldStorefrontVisibility record?
If not, what am I doing wrong?
Thanks.
Solved! Go to the solution
This is an accepted solution.
If found the problem. I was testing against the wrong "store" My apologies.
This is an accepted solution.
If found the problem. I was testing against the wrong "store" My apologies.