Anchor to section titled 'undefined'

cartMetafieldDelete
mutation

Deletes a cart metafield.


The input fields used to delete a cart metafield.


Was this section helpful?

The ID of the deleted cart metafield.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation cartMetafieldDelete($input: CartMetafieldDeleteInput!) {
  cartMetafieldDelete(input: $input) {
    deletedId
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "input": {
    "key": "<your-key>",
    "ownerId": "gid://shopify/<objectName>/10079785100"
  }
}
input CartMetafieldDeleteInput {
  key: String!
  ownerId: ID!
}