expose the meta fields via admin API's but unable to get with storefront

iamabdullah
New Member
1 0 0

Hi,

I have exposed meta fields via admin API's

mutation metafieldStorefrontVisibilityCreate($input: MetafieldStorefrontVisibilityInput!) {
  metafieldStorefrontVisibilityCreate(input: $input) {
    metafieldStorefrontVisibility {
      id
    }
    userErrors {
      field
      message
    }
  }
}
{
  "input": {
    "namespace": "global",
    "key": "amplifier-class",
    "ownerType": "PRODUCT"
  }
}

 Get a response from Shopify

{
  "data": {
    "metafieldStorefrontVisibilityCreate": {
      "metafieldStorefrontVisibility": {
        "id": "gid://shopify/MetafieldStorefrontVisibility/130252958"
      },
      "userErrors": []
    }
  }
}

 all expose meta fields are shown in the meta guru app.

exposed-fields.PNG

But unable to get these from the storefront Graphql. only return 2 meta fields.

graphql-meta-fields.PNG

need help on this.

Thanks
Abdullah

0 Likes