attributeValueCreate Mutation
Creates a value for an attribute.
Requires one of the following permissions, depending on the attribute type: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES for PRODUCT_TYPE attributes, MANAGE_PAGE_TYPES_AND_ATTRIBUTES for PAGE_TYPE attributes, MANAGE_CUSTOMER_TYPES_AND_ATTRIBUTES for CUSTOMER_TYPE attributes.
Triggers the following webhook events:
- ATTRIBUTE_VALUE_CREATED (async): An attribute value was created.
- ATTRIBUTE_UPDATED (async): An attribute was updated.
Applied directives
@webhookEventsInfo(asyncEvents: [ATTRIBUTE_VALUE_CREATED, ATTRIBUTE_UPDATED], syncEvents: [])
attributeValueCreate(attribute: ID!, input: AttributeValueCreateInput!): AttributeValueCreate
Returns
Show return type
type AttributeValueCreate {
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "Use `errors` field instead.")
errors: [AttributeError!]!
attributeValue: AttributeValue
}Arguments
attribute
attribute · ID!
Attribute to which value will be assigned.
input
input · AttributeValueCreateInput!
Fields required to create an AttributeValue.
Schema: Saleor 3.23.43. Download SDL.