deleteProductAttribute
Requires permission products:product:update.
Deletes a product attribute or one value of it; something products carry is removed from them only when asked. Requires permission to update products.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation DeleteProductAttribute($input: DeleteProductAttributeInput!) {
deleteProductAttribute(input: $input) {
findersNeedingAttention
findersUpdated
variantsUpdated
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation DeleteProductAttribute($input: DeleteProductAttributeInput!) {\n deleteProductAttribute(input: $input) {\n findersNeedingAttention\n findersUpdated\n variantsUpdated\n }\n}",
"variables": {
"input": {
"attributeKey": "string"
}
}
}
EOF
Variables:
{
"input": {
"attributeKey": "string"
}
}
Response:
{
"data": {
"deleteProductAttribute": {
"findersNeedingAttention": [
"string"
],
"findersUpdated": [
"string"
],
"variantsUpdated": 0
}
}
}
deleteProductAttribute(
input: DeleteProductAttributeInput!
): ProductAttributeChangeResult!
Arguments
deleteProductAttribute.input ● DeleteProductAttributeInput! non-null input
What to delete.
Type
ProductAttributeChangeResult object
What an attribute change did.