Anchor to productDeleteAsyncproduct
productDeleteAsync
mutationDeprecated
Requires access scope. Also: The user must have a permission to delete a product.
Deletes a product asynchronously, including all associated variants and media. Use instead.
Anchor to Arguments
Arguments
- Anchor to productIdproduct•
Id ID!required The ID of the product to be deleted.
Was this section helpful?
Anchor to ProductDeleteAsyncPayload returnsProductDeleteAsyncPayload returns
- Anchor to deleteProductIddelete•
Product Id The ID of the product that was requested to be deleted.
- •
The background job that will delete the product and its associated variants and media.
- Anchor to userErrorsuser•
Errors [ProductDelete non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation productDeleteAsync($productId: ID!) {2 productDeleteAsync(productId: $productId) {3 deleteProductId4 job {5 # Job fields6 }7 userErrors {8 field9 message10 }11 }12}
Input
1{2 "productId": "gid://shopify/<objectName>/10079785100"3}
{
"productId": "gid://shopify/<objectName>/10079785100"
}