Create a product and assign / modify attributes values
This mutation assumes that below already exists in the system:
- template with code
template
- textarea attribute with code
description
- text attribute with code
text_attribute
pl_PL
language is active
mutation {
productCreateSimple(input: { sku: "new_product", templateCode: "template" }) {
__typename
}
productAddAttributeValueTranslationsTextarea(
input: {
sku: "new_product"
attributeCode: "description"
translations: [{ value: "Długi opis", language: "pl_PL" }]
}
) {
__typename
}
productAddAttributeValueTranslationsText(
input: {
sku: "new_product"
attributeCode: "text_attribute"
translations: [{ value: "wartość", language: "pl_PL" }]
}
) {
__typename
}
}