Hello,
I’m trying to query the storefront api version 2023-07 for a metaobject. The following is the structure of my query:
const query = `
query bundleParent($id: ID!) {
metaobject(id: $id) {
id
handle
fields {
key
}
parent: field(key:"bundle_parent"){
value
data:reference {
... on ProductVariant {
id
title
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
size: metafield(key: "size", namespace: "bundle") {
value
}
}
}
}
children: field(key:"bundle_children"){
value
}
}
}
`
I’m running this query through the ShopifyGraphiQL app with all permissions enabled and ensuring I’ve selected the storefront api version 2023-07
I’ve ensured the following checklist:
- The metaobject is available to Storefront API.
- The metaobject has the fields and data I’m trying to access.
- Send the associated metaobject id as a variable along with the query.
When making this query to the storefront api, it returns back the metaobject, however it does not recognize any fields associated with the metaobject. Meaning all I have access to is the id and the handle from the above query. The parent field returns null, the children field returns null and even the fields field returns an empty array.
Is there something I’m doing wrong here? I’ve tested the exact same query with some minor differences on the Graphql Admin Api and it works just fine.