How to fetch meta fields referenced in the meta object?

query VendorContact($handle: String!, $namespace: String!, $key: String!) {
  productByHandle(handle: $handle) {
    title
    metafield_0: metafield(namespace: $namespace, key: $key) {
      key
      namespace
      references(first: 50) {
        edges {
          node {
            ... on Metaobject {
              fields {
                key
                type
                value
              }
              definition {
                description
              }
            }
          }
        }
      }
    }
  }
}

Why reference is null?

Hi @begginer1231 ,

Check this query :

query VendorContact($handle: String!, $namespace: String!, $key: String!) {
  productByHandle(handle: $handle) {
    id
    title
    metafield(namespace: $namespace, key: $key) {
      id
      namespace
      key
      value
      references(first: 10) {
        edges {
          node {
            ... on Metaobject {
              id
              type
              handle
              definition {
                description
              }
            }
          }
        }
      }
    }
  }
}

Hope this might be helpful for you.

Thanks…

Thank you. I tried with the query you suggested, but the result remains the same.

Hi @begginer1231 ,

The metaobject you have created please add values to it.

Please refer screenshot because this query is working and I am getting the result.

You can also check by directly using handle of product and metafield namespace and key.

Thanks…