Querying a metafield that is a metaobject reference

I’m trying to see if I can get some fields from the metaobject reference in a customer metafield that is a metaobject reference.

I’ve tried reference and references and both are null:

  customer(id:"gid://shopify/Customer/6880413155446") {
    id
    firstName    
    lastName    
    metafields(first:10) {
      nodes {
        namespace
        key
        value
        type
        references(first:10) {          
          nodes {
            ... on Metaobject {
              handle
              type
              displayName
            }
          }
        }
      }
    }
  }
}

This was a permissions issue. The access token I was using in postman didn’t have permissions to metaobjects. :skull:

Glad you figured this out Kalen! Super easy to miss permissions.

1 Like