Mutation productSet error: Field 'productSet' doesn't exist on type mutation

Topic summary

A developer encountered an error stating that the productSet field doesn’t exist on the mutation type when attempting to create products using Shopify’s GraphQL Admin API version 2024-04.

Root Cause Identified:
The mutation declaration included a $synchronous parameter that was defined but not passed as an argument to the productSet mutation call.

Solution:
The missing synchronous argument needed to be added to the mutation:

productSet(synchronous: $synchronous, input: $productSet)

Additional Context:

  • Shopify Support confirmed productSet is only available in API version 2024-04 or later; earlier versions will produce this error
  • The developer initially worked around the issue by reverting to REST API solutions
  • After applying the fix, the mutation worked successfully in the development environment
  • Developer noted plans to eventually migrate fully to GraphQL as Shopify transitions away from REST APIs

Status: Resolved - the mutation now functions correctly with the proper parameter inclusion.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hi, thi is the details:
API admin versione: 2024-04

Mutation:

mutation createProductSynchronous($productSet: ProductSetInput!, $synchronous: Boolean!) {
  productSet(synchronous: $synchronous, input: $productSet) {
    product {
      id
    }
    productSetOperation {
      id
      status
      userErrors {
        code
        field
        message
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}

input:

{
                "productSet": {
                    "title": "Winter hat",
                    "productOptions": [
                        {
                            "name": "Color",
                            "position": 1,
                            "values": [
                                {
                                    "name": "Grey"
                                },
                                {
                                    "name": "Black"
                                }
                            ]
                        }
                    ],
                    "variants": [
                        {
                            "optionValues": [
                                {
                                    "optionName": "Color",
                                    "name": "Grey"
                                }
                            ],
                            "price": 79.99
                        },
                        {
                        "optionValues": [
                            {
                                "optionName": "Color",
                                "name": "Black"
                            }
                        ],
                        "price": 69.99
                        }
                    ]
                }
            }

Please help me to face off this weird problem, because I copy the example in the documentation and it doesn’t work.

Hi @FrancoTampieri ,

I tested the same productSet mutation you are running on my own test store, and I’m not able to replicate the error on API Version 2024-04, however I am able to replicate the issue when calling API Version 2024-01 or earlier, which is expected behaviour as productSet is a new mutation added in 2024-04.

If I can ask you to please double check that you are making this api call on 2024-04 or later. If you have confirmed that you are making the call on 2024-04 and the issue is still occurring, we will need you to reach out to our Support Team with specific examples that we can look into further.

If needed you can reach out to our Partner Support Team directly via your Partner Organization Admin, and please be sure to provide some specific context with examples where the issue occurred, including the full HTTP Request and Response, both the body and headers, of the call you are making (please be sure not to share any private access tokens that may be listed in the headers)

I hope this helps, and I hope you have a great day :slightly_smiling_face:

1 Like

Hi. There

you missing one parameter synchronize in your Graphql input .

you declared the field. but did not provide the arg.

mutation createProductSynchronous($productSet: ProductSetInput!, $synchronous: Boolean!) {
  productSet(**synchronous: $synchronous**, input: $productSet) {

1 Like

Hi!

sorry for the delay, but for timing I fall back to the REST solutions. I used the “official” Shopify Python API, but as I see the development of that library is slow and less advanced, so I switched to another python solution based to a modern httpx library that I can use using async programming and handling the rate limits better.

Another thing I would like to share is that I see in the documentation like the suggestion to use inventorySetQuantities instead the inventorySetOnHand****Quantities but in the 2024-04 is not released yet, that can be confusing.

Beste regards

Franco

Than you! I tried in my dev environment and it works… thank you :slightly_smiling_face:

For some time reasons I step back to the Rest solutions, but I know that shopify will move all to the graphQL queries and mutations and I need to learn and move to that API

Kind Regards

Franco