metafieldDelete mutation
Deletes a metafield.
On this page
Interactive example
This is an example mutation query.
mutation metafieldDelete($input: MetafieldDeleteInput!) { metafieldDelete(input: $input) {} } { “input”: {
<font style="color:#1F61A0;">deletedId</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
} }
<font style="color:#8B2BB9;">"id"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE="</font>
Arguments
| Argument | Description | 
|---|---|
input( [MetafieldDeleteInput!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafielddeleteinput)) REQUIRED  | 
MetafieldDeleteInput fields
- id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED
The ID of the metafield to delete. 
Return fields
- deletedId (
[ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
The ID of the deleted metafield. - userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
List of errors that occurred executing the mutation. 
