Hi,
I am building a checkout UI extension that is supposed to query all the metaobjects from a specific type. For example, I have the Metaobject definition:
When trying to run this query:
const { data } = await query(
`query (
$type: String!,
$sortKey: String,
$first: Int
){
metaobjects(
type: $type,
sortKey: $sortKey,
first: $first,
) {
nodes {
id
updatedAt
displayName
fields {
key
value
}
}
}
}`,
{
variables: {
"type": "vet",
"sortKey": "id",
"first": 10
},
}
);
it tells me "“Field ‘displayName’ doesn’t exist on type ‘Metaobject’”. According to the docs (https://shopify.dev/docs/api/admin-graphql/2024-07/queries/metaobjects), the return of this function should accept a displayName field, however it doesn’t. What could be happening?
Thank you in advance!
