Product Metafields don't update with GraphiQL

Hi Arkadi,

It looks like the issue you are running into here is that your mutation is missing the valueType parameter in the input. In this case, you will most likely want to set this to “INTEGER”.

In the future, I recommend that you try running these mutations in the Shopify GraphiQL App and including the userErrors return field to get the most amount of feedback. For your mutation, including the userErrors would have given you the information to help fix the issue. I’ve included an example below.

mutation productUpdate($input: ProductInput!) {
  productUpdate(input: $input) {
    product {
      metafield(namespace: "global", key: "wish_count") {
        id
        namespace
        key
        value
      }
    }
    userErrors {
      field
      message
    }
  }
}

Variables:

{
  "input": {
  	"id": "gid://shopify/Product/8441259336",
    "metafields":  {
        "namespace": "global",
        "key": "wish_count",
        "value": "550",
        "valueType": "INTEGER"
      }
  }
}

If you run into any other issues, please reach out!