To delete one or more products from the product catalog, use the deleteProducts
mutation.
This operation is permanent and irreversible. All data associated with the products will be cleared.
mutation {
deleteProducts(productIds: ["TXUAA800A", "TXUX9800A"]) {
deletedCount
}
}
{
"data": {
"deleteProducts": {
"deletedCount": 2
}
}
}
Arguments
Arguments supported by the deleteProducts
mutation
Argument | Values | Required? | Definition |
---|---|---|---|
productIds | Array of string | Required | The IDs of products to delete |
Fields
Fields returned by the deleteProducts
mutation
Field | Values | Required? | Definition |
---|---|---|---|
deletedCount | Integer | Required | The number of products deleted from the product catalog |