Discuss all the new features introduced with the new product model in GraphQL.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
When did the new GraphQL product APIs go into stable release?
The new GraphQL product APIs went into stable release in April 2024 as part of the 2024-04 release.
Are the existing GraphQL and REST API product APIs deprecated?
Yes, the REST product APIs have been marked deprecated and the GraphQL fields were removed in 2024-04.
How can I test 2000 variants?
To test 2000 variants, create a new development test store with the 'Extend Variants' developer preview enabled.
Am I required to make changes to my app/migrate to the new GraphQL product APIs?
If your app works with products and uses REST APIs or existing GraphQL product APIs to work with products, you will need to make changes to your app/migrate to the new GraphQL APIs
Will the REST API ever support more than 100 variants or more than 3 options?
No. The REST API will not support more than 100 variants or more than 3 options. We are only building this support in GraphQL, the future of APIs at Shopify.
I am seeing support for 2000 variants, but only 3 options on the test store in the Dev Preview. Is that expected?
Yes. The developer preview test stores are currently limited to 2K variants and 3 options. We expect to raise the option limit sometime in 2024. Please note that there will be no Admin API changes for supporting increased options, so your app should be able to benefit from increased options without any additional changes.
I have used the new APIs in developer preview to set up a product with up to 2000 variants, however when I go into Shopify admin on my test store, I am not seeing more than 250 variants.
Some areas of Shopify admin (for example, the Products page) are limited to only showing 250 variants in the UI. We are updating Shopify admin throughout Q3 2024 to ensure support for up to 2000 variants.
I am a theme developer / agency partner / Storefront API user. Do I need to make any changes to support an increased number of variants?
Yes, the latest version of Dawn and our dev docs on supporting high-variant products in themes can be used as a reference. We will be updating you with more information later this year.
If we were to move our app from REST to GraphQL, we expect there to be throttling because of the query costs and rate limits. Will there be an increase in graphQL rate limits or query costs?
We have now raised the rate limits for standard shops from 50points/second to 100 points / second. We have also updated the query calculations for querying connections. With these changes, your app should be able to maintain the same or higher throughput as before when using REST.
To learn more about how to optimize your app for throughput, read more here
I have used the productCreate APIs to set up a product with options and optionValues. However I am not seeing any variants being created.
We have deprecated the variants field on productCreate. When you create a product with options and optionValues, it does not automatically create variants. You will need to use the productVariantsBulkCreate mutation to create these variants. To learn more about this workflow, refer to the documentation here.
I have used the productCreate APIs to set up a product with options and optionValues. However I am not seeing any of these option values on Shopify Admin
When you create a product with options and optionValues using productCreate mutation, it does not automatically create variants and associate the option values to them. While these optionValues exist and have their unique IDs, they are not associated with any variant. Shopify Admin does not show you any of these optionValues unless they are associated with a variant. To associate them with variants, use the productVariantBulkCreate mutation. To learn more about this workflow, refer to the documentation here.
I have used the productCreate APIs to set up a product with options and optionValues. However I am not seeing any of these option values when querying product.options.values
product.option.values only shows you the optionValues that are associated with a variant. If there are optionValues that are not associated with variants, they are not returned by product.option.values. To see all the optionValues, use the product.option.optionValues field in your query
Will the webhooks payload continue to have all the information (for up to 2000 variants). We rely on webhooks to understand if anything changed on the product and get a complete state of the product.
We are making the following changes to the product webhooks payload.
If the product generating the webhooks has <=100 variants, you can still get the complete state of the product. However if the product has >100 variants, you will need a follow up query to get information on the variants 101+ to construct the full state of the product.
I have an app that syncs product data from an external database into Shopify. Earlier I used to use the REST /product endpoint (or GraphQL productUpdate mutation) to send the entire state of the product to Shopify in one call. Is there going to be a new mutation that does something similar on GraphQL?
We have introduced the productSet mutation to the GraphQL Admin API, to create and update the state of a product per an external database. It is available in both asynchronous and synchronous modes. It will have a productOption and a variants input. The variants input will have an optionValues input for pulling product and variant data from the external database.
You should be able to use this mutation when you're managing the state of the product model outside of Shopify, and want to update Shopify's product model state to reflect your external state. Examples are Enterprise Resource Planning (ERP) systems and Worksheets. To learn more, please watch out for updates here
If I want to update a product with >100 variants, what mutations should I use
This depends on your app’s workflow. We've developed different sets of mutations that are catered to different workflows common to Shopify apps and use cases. Because there are multiple ways to work with the new product model, identify the workflow that best matches your app or use case and use the corresponding types in the GraphQL Admin API.
Creation of products with >100 variants is slow. Is this a known issue?
Why is there a 100 variant limit for the productSet mutation in synchronous mode?
We expect merchants in the future would have very complex product profiles (Eg. thousands of variants, multiple metafields per variant). Such an unbounded nature of the mutation would cause a synchronous mutation to timeout. As a result, we decided to limit productSet in synchronous mode to 100 variants. If you expect any of your users to be working with >100 variants and/or many connected fields, we highly recommend using the mutation in asynchronous mode.
Why does productSet mutation not support managing a) inventory, b) publishing, c) creation of media
As the workflows enabled on managing inventory, publishing and media management have gotten more complex, we want developers to use the mutations geared towards these specific workflows.
What happens when I send a valid payload without an ID on productSet mutation
A new Product is created
What happens when I send a valid payload with a non existent ID on productSet mutation
The API returns an error
For both creating or update a product using productSet, why am i getting an error when the input has options that are not used in variants
Variant has to have an assigned value for all the options attached to a product. The Product can’t be created with a variant that does meet that criteria
Can I create a new Media through the API
You may create new media, and subsequently set up a new product with this created media.
- To learn more visit the Shopify Help Center or the Shopify Blog