GraphQL Schema Incompatibility Causing Product Creation Failure Across Multiple Shopify Stores

Hello Shopify Developer Community,

I’m working on a middleware that connects to multiple Shopify stores to onboard them and create products. While product creation works fine for the first five stores, it fails on the sixth store with the following GraphQL error:

“InputObject ‘ProductInput’ doesn’t accept argument ‘variants’”

Interestingly, the same mutation works successfully on some stores but not others. I suspect this is due to differences in the GraphQL schema or API versions supported by each store.

Has anyone encountered this issue before? How do you handle API versioning or schema differences across multiple stores in a generic way? Is there a recommended approach to detect and adapt to each store’s supported API version or schema?

Any guidance or best practices would be greatly appreciated. Thanks!

Hi @user657

The middleware application is most likely not specifying a concrete API version in its API request URLs.

When no version is specified, Shopify defaults to the version configured in the Partner Dashboard or, in some cases, another stable version determined by Shopify at that moment.

To resolve this, you can try the following:

Step 1: Choose a Single, Stable API Version as the Standard
Select a recent and well-supported API version (e.g., 2025-07). The entire application’s logic should be written to be compatible with ONLY this version.

Step 2: Explicitly Specify the API Version in Every Request
When sending a GraphQL request to any store, you must ensure the endpoint URL always contains the chosen version.

Hope this helps!

Hi @PieLab

I am migrating all APIs to 2025-07 version and I can see that product model has changed and I can create product without a variant. But I am not sure which mutation should I use to update price, sku and enable tracking, inventory qty fields on default variant? I am able to fetch default variant id and inventory item id. Can you plz suggest?

Thanks,

Arun