Hello,
I am trying out the shopify admin API, and I have reason to believe that it doesn’t work as intended when creating a product. Can you please confirm
I send this mutation:
mutation {
productCreate(input:{
title: "aa - Magnus Test Product",
productType: "Print",
vendor: "Test",
status: DRAFT,
productOptions: [{
name: "Størrelse",
position: 1,
values: [
{name: "A4 (21x29.7 cm)"},
{name:"30x40 cm"},
{name: "50x70 cm"}
]
},
{
name: "Ramme",
position:2,
values: [
{name: "Ingen ramme"},
{name: "Sort ramme"},
{name: "Massiv eg"},
{name: "Hvid ramme"},
{name: "Ege look"}
]
}
]
}) {
product {
id,
options (first: 100) {
name,
optionValues {
name,
}
}
}
}
}
And get this response:
{
"data": {
"productCreate": {
"product": {
"id": "gid://shopify/Product/9446736462165",
"options": [
{
"name": "Størrelse",
"optionValues": [
{
"name": "A4 (21x29.7 cm)"
},
{
"name": "30x40 cm"
},
{
"name": "50x70 cm"
}
]
},
{
"name": "Ramme",
"optionValues": [
{
"name": "Ingen ramme"
},
{
"name": "Sort ramme"
},
{
"name": "Massiv eg"
},
{
"name": "Hvid ramme"
},
{
"name": "Ege look"
}
]
}
]
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 12,
"actualQueryCost": 12,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1988,
"restoreRate": 100
}
}
}
}
So far, so good.
It seems like shopify does correctly catch my options. The thing is visible whenever I query the product by ID. HOWEVER
When i go to the UI of the product, it doesn’t quite seem to work.
I can only see the first of the two options, and then a variant has been created for the combination of the two options.
“A4 / ingen ramme” for example (see image as well)
How come this is only created for the first combinations, and what is the approach to make it happen for all?
Best regards,
magnussampson