I’ve been going in circles trying to figure out why my code is receiving response 200 and my product is created yet all options after the first in the array are ignored. My submission is as follows:
mutation { productCreate(input: {title: “test productCreate run 1”, descriptionHtml: “
It seems you must have a variant for the product with those options before they are visible, they are created on the product, but in the UI you cannot see them until you have options with those values.
mutation CreateProductWithOptions($input: ProductInput!) {
productCreate(input: $input) {
userErrors {
field
message
}
product {
id
options {
id
name
position
values
optionValues {
id
name
hasVariants
}
}
variants(first: 5) {
nodes {
id
title
selectedOptions {
name
value
}
}
}
}
}
}
First of all thank you for the response. I have tested as outlined and requested a response of the option / values to indeed see the options I submit are there…
I find that to be seriously annoying going around in circles looking at admin simply because the UI doesn’t display all options that don’t have variations , maybe ( and I doubt it ) they should change that to display such options greyed out to indicate their presence but disabled due to no variation. That would make way more sense.