Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am trying to get the value of a custom metafield through the storefront API. The metafield will return 'null' unless I use the Admin API in which case it responds correctly.
I have made sure the storefront access option for the metafield definition is on 'Read'.
Is this an intended response?
{
shop {
name
}
products(first: 10) {
edges {
node {
title
metafield(key: "custom.sold_count") {
value
}
}
}
}
}
# Response
{
"data": {
"shop": {
"name": "Shop name"
},
"products": {
"edges": [
{
"node": {
"title": "Product name",
"metafield": null
}
}
]
}
}
}
Hi there!
I’m facing the same issue here. I already have a bunch of old fields working correctly when querying from the Storefront API, but new fields are only returning from the Admin API. I’m still using ACF Metafields, but like I said, the fields created previously are working fine.
I’ll keep investigating, and if I find anything, I’ll post it here.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025