Hello,
On my queries requests on metafields, I notice a strange behavior (tested in 2026-04 and unstable).
Query 1:
query getShopMetafield {
shop {
metafields(first: 1) {
nodes {
namespace
value
key
}
}
}
}
Data 1:
{
"shop": {
"metafields": {
"nodes": [
{
"namespace": "custom",
"value": "value",
"key": "my_metafield"
}
]
}
}
}
Query 2:
query getFilteredShopMetafield {
shop {
metafields(first: 1, keys: ["custom.my_metafield"]) {
nodes {
namespace
value
key
}
}
}
}
Data 2:
{
"shop": {
"metafields": {
"nodes": [
{
"namespace": "custom",
"value": "value",
"key": "custom.my_metafield"
}
]
}
}
}
The key is prefixed by the namespace in its field only on second query. I didn’t find any documentation about this. Can it be considered an inconsistency or is there a special meaning to this behavior?
Thank you in advance