A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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 }, } );
Hi Rjantsch - are you using the Storefront API? If so that does not support displayName
which could be why you're seeing this.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog