Skip to main content

renameProductAttribute

Requires permission products:product:update.

Renames a product attribute on every product carrying it and in the product finders that name it. 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 RenameProductAttribute($input: RenameProductAttributeInput!) {
renameProductAttribute(input: $input) {
findersNeedingAttention
findersUpdated
variantsUpdated
}
}

Variables:

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

Response:

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

Arguments​

renameProductAttribute.input ● RenameProductAttributeInput! non-null input​

The attribute and its new name.

Type​

ProductAttributeChangeResult object​

What an attribute change did.