Skip to main content

addProductAttributeValue

Requires permission products:product:update.

Adds a value to a product attribute. 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:

mutation AddProductAttributeValue($input: AddProductAttributeValueInput!) {
addProductAttributeValue(input: $input) {
findersNeedingAttention
findersUpdated
variantsUpdated
}
}

Variables:

{
"input": {
"attributeKey": "string",
"value": "string"
}
}

Response:

{
"data": {
"addProductAttributeValue": {
"findersNeedingAttention": [
"string"
],
"findersUpdated": [
"string"
],
"variantsUpdated": 0
}
}
}
addProductAttributeValue(
input: AddProductAttributeValueInput!
): ProductAttributeChangeResult!

Arguments​

addProductAttributeValue.input ● AddProductAttributeValueInput! non-null input​

The attribute and its new value.

Type​

ProductAttributeChangeResult object​

What an attribute change did.