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:
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!
Shopify stores are not locked to a specific version - all stores can make API requests to any currently stable version. The API version used for any request is determined by the app making the request, not by the store itself.
But if you have different apps, or your app does not consistently specify the API version, you may see differences in behavior across stores. The best practice is to always specify the API version in your app’s requests and update your app to use supported versions as Shopify deprecates old ones.
Can you share the full mutation where you were getting the “InputObject ‘ProductInput’ doesn’t accept argument ‘variants’” error?
Thanks for your quick response. I have a PHP code which makes API calls but to isolate problem I tried same request body on two of my stores via Postman. Please see the attached screenshots for reference. Please let me know if I should share PHP code as well.
What is the value of X-Shopify-API-Version? This is the API version Shopify is using to fulfil your request (docs).
Your screenshots suggest you are requesting API version 2023-10. Depending on the client you are using, the current oldest accessible API version would be 2024-04 or 2024-10.
Requests to 1t9ecy-kw.myshopify.com are using 2024-10 according to the logs from the context I can infer. Are you sure you are seeing a X-Shopify-API-Version response header of 2023-10? If you were to provide the X-Request-Id response header I could lookup the exact request you are making.
Thanks @Rob-Shopify I will set this header and will share id with you.
Meanwhile I am migrating all APIs to 2025-07 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?