I am using the graphql metafieldDelete mutation to delete a metafield and the api responds with an error saying metafield id not found. I build the api request to delete by using metafield ids I get from the products graphql api and I can see the metafield with the id exists. We are using api version 2020-07.
I see you are using the Shopify GraphiQL app on your shop. It looks like you never granted the app the correct permissions to make writes. I see it has read permissions, but you will need to remove it and reinstall it with additional write permissions to be able to use a mutation.
Thanks for the response. I am trying to do this in the our app code and using a private app account configured on Shopify. As I mentioned in the edit, it works fine in another shop instance that we own. The permissions for this private app is the same on both shops.
Can you grab the x-request-id response header for the call that doesn’t work? When I looked yesterday, the only mutation I saw for the metafield with id “gid://shopify/Metafield/14348829261981” was being made from the Shopify GraphiQL app.
Can you confirm which scopes are granted to your app? This is seeming more like a permissions issue based on the errors I am seeing. Can you confirm your app has the “write_products” scope selected?
Thanks for confirming. Can you try and reproduce once more for me and provide the metafield ID and request ID. Our logs don’t have enough retention for me to see the logs from the last example you sent.
Sorry about the late response. This is our bad actually. The service that handled metafield deletion internally was configured to use different app credentials.