Hey @dataease_app - I did a bit of digging into this on my end here, and I think this syntax should work for the mutation:
mutation RemoveAllProductMetafields($input: ProductSetInput!) {
productSet(input: $input) {
product {
id
metafields(first: 50) {
edges {
node {
id
namespace
key
value
type
createdAt
updatedAt
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
userErrors {
field
message
}
}
}
Variables:
{
"input": {
"id": "gid://shopify/Product/product-id-here",
"metafields": []
}
}
Defining “input” in the variables seemed to work for me - can you let me know if you encounter any other errors there? Hope this helps!