Get started migrating and test your app
There are a number of helpful tips and resources available for migrating from the REST product APIs to the new GraphQL APIs. As you learn with this guide, new questions may come up - we encourage you to post them in Shopify Community: New GraphQL Product APIs Forum.
Create a development store that allows 2,000 variants per product
Anchor link to section titled "Create a development store that allows 2,000 variants per product"By default, stores have a limit of 100 variants for each product. We recommend testing your app with a development store that allows products with 2,000 variants. You can create and configure a development store with the Extended Variants developer preview by following these steps:
Log in to your Partner Dashboard.
Select Stores and click Add store > Create development store.
Choose Create a store to test and build.
Enter a unique store name.
Under Build version, select Developer preview.
From the dropdown list, select Extended Variants.
Click Create development store.
You can now test and experiment with the expanded product variant limits in your new dev store.
Mapping Product and ProductVariant REST IDs to GraphQL GIDs
Anchor link to section titled "Mapping Product and ProductVariant REST IDs to GraphQL GIDs"When migrating from REST to GraphQL for products and variants, you don't need to restructure your database to include a GraphQL-specific ID column. Instead, you can create the GraphQL global ID (GID) using an existing REST ID.
The following example shows how the GID format is the existing REST ID prefixed with "gid://shopify/Product/"
for products and "gid://shopify/ProductVariant/"
for variants.
Endpoint and Field differences between REST and GraphQL
Anchor link to section titled "Endpoint and Field differences between REST and GraphQL"A key task will be to map the REST calls your app makes to /products
and /variants
to the various queries and mutations in GraphQL, including the selection of fields in GraphQL. The REST reference documentation now includes direct mapping between REST HTTP methods and fields and the corresponding GraphQL reference documentation.