I’m building an app feature that requires app-owned metaobjects linked to products via a list.metaobject_reference metafield. Both are declared in shopify.app.toml with access.storefront = "public_read".
Setup:
[metaobjects.app.my_custom_type]
name = "My Custom Type"
access.storefront = "public_read"
[product.metafields.app.my_reference]
name = "My Reference"
type = "list.metaobject_reference<$app:my_custom_type>"
access.storefront = "public_read"
Our app can read the data fine via Storefront API using our own storefront access token — the metafield value and referenced metaobject entries resolve correctly.
The problem: When a third-party app or partner queries the same product via the Storefront API using their own storefront access token, the metafield references come back as null:
{
"data": {
"product": {
"metafield": {
"references": null
}
}
}
}
The metafield value itself (the raw GID list) may be visible, but the resolved references are null.
What worked: Partners were able to access the app-owned metafields when using the resolved app namespace in the query app-<<APP_ID>>. This also worked app-owned metaobjects linked to app-owned metafields
query {
product(id: "gid://shopify/Product/<<PRODUCT_ID>>") {
customBadge: metafield(namespace: "app-<<APP_ID>>", key: "custom_badge") {
namespace
key
type
value
}
}
}
This returns data correctly. However there is no official shopify documentation to prove this.
Could someone help me with this.