App reviews, troubleshooting, and recommendations
Hello ,
I'm a little bit stuck on this and I'll really appreciate your help.
I try to create an option with multiple values, using the mutation productOptionsCreate.
Whatever I do, it only creates one option (the first one : Yellow). When I check the specs, values is indeed an array.
https://shopify.dev/docs/api/admin-graphql/latest/mutations/productoptionscreate
Your help will be greatly appreciated. 😀
mutation AddOptions {
productOptionsCreate(
options: {name: "myColors", values: [
{
name: "Yellow"
},
{
name: "Red"
}
]},
productId: "gid://shopify/Product/14843488108876"
) {
product {
options {
id
name
values
}
}
Thanks a lot !
Solved! Go to the solution
This is an accepted solution.
Yes, ProductSet mutation is working, Thank you
Thanks a lot for your very fast reply ! I tried this on GraphiQL and I think it's not working because values expects an OptionValueCreateInput datatype.
Did you tried that by yourself on GraphiQL. Thx again :-).
And there is an exemple of multiple name (for value), here https://shopify.dev/docs/api/admin-graphql/latest/mutations/productoptionupdate.
Apparently it's not working with the create 🙂
Hi @jaadtoly
If you’re open to trying an app instead of working with the code, you can check out Easify Product Options. It lets you create product options with multiple values easily—no coding needed. Might save you some time. Here's an example of a product that has a lot of options:
This app is easy to use, and I highly recommend giving it a try. If you need any help, feel free to ask or contact Easify!
Thanks a lot for the info, but that's not applicable in my case, as I develop a full nodejs app. I'll try with productOptionUpdate (optionValuesToAdd). Apparently there is a bug with productOptionsCreate.
Have a lovely day
Can you help me with the same issue?
I am developing an app that creates products using mutations in Shopify. I have successfully created the product creation and media creation APIs, but I am currently encountering errors while creating the variants.
When I attempt to create variants, I receive an error saying "no options exist." And, when I try to add options before creating variants, it only generates the first option.
Hi Aima,
I didn't tried yet, but my next try will be a call to the mutation ProductSet. Apparently with that mutation, you can create the product, images, variants, options, etc.. in 1 (asynchronous) call. No need to call one mutation for the product, one for the variant, one for the options, etc... Give it a try and tell me if it works. 😀
This is an accepted solution.
Yes, ProductSet mutation is working, Thank you
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025