I am trying to access a metafield created with an app reserved namespace that is owned by a product using a theme app extension. So far I am not able to access the value stored in the metafield using liquid in the theme app extension.
GQL:
mutation UpdateProductMetafield($productInput:ProductUpdateInput!){
productUpdate(product: $productInput){
userErrors{
field
message
}
}
}
I have tried using {{ app.metafields[“$app:bundle”].components.value }} It does not show a value either. From what I have read this will show metafields attached to the current app installation and not a product. Although it is not working so I could be wrong.
I have found a solution that allows the metafield to still be private but will show on the storefront. A metafield definitions needs to be created like so: