Skip to main content

setProductAttributeValueParent

Requires permission products:product:update.

Sets or clears the value another attribute's value belongs to (a Phone Model belongs to a Compatible Brand); the buyer filters then list only the values whose parent is picked. 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 SetProductAttributeValueParent($input: SetProductAttributeValueParentInput!) {
setProductAttributeValueParent(input: $input) {
imageUrl
parentAttributeKey
parentValue
value
variantCount
}
}

Variables:

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

Response:

{
"data": {
"setProductAttributeValueParent": {
"imageUrl": "string",
"parentAttributeKey": "string",
"parentValue": "string",
"value": "string",
"variantCount": 0
}
}
}
setProductAttributeValueParent(
input: SetProductAttributeValueParentInput!
): ProductAttributeValue!

Arguments​

setProductAttributeValueParent.input ● SetProductAttributeValueParentInput! non-null input​

The value and the value it belongs to.

Type​

ProductAttributeValue object​

One value of a product attribute.