Chord OMS
...
Gatsby
Guides
v3.x to v4.x Migration Guide
8min
this major release upgrades the shopify storefront api version to 2022 07 prior to this release, this theme used the oldest available version of the storefront api upgrading to this release is strongly advised because two breaking changes will impact users around january 1, 2023, when shopify starts serving the version 2022 04 to users major changes this release upgrades the shopify storefront api version to 2022 07 this storefront api version includes two breaking changes shopify ids are no longer base64 encoded https //shopify dev/changelog/changes to storefront api object ids presentmentprices has been removed from the api and will cause an error if included in the graphql query shopify now supports multi currency in a different way https //shopify dev/custom storefronts/internationalization/international pricing these are the only changes in this release upgrade guide 1\ update dependencies update @chordcommerce/gatsby theme performance to ^4 0 0 if you have @chordcommerce/product rss feed as a dependency, update to ^3 0 0 2\ remove shopify id encoding/decoding logic as of the 2022 04 shopify storefront api release, shopify ids are no longer base64 encoded you may have code in your website that is encoding and/or decoding ids this code can be removed previous versions of gatsby starter performance included a utility file at src/utils/shopify/index js with two functions, encodeshopifyvariantid and decodeshopifyid if you're using these functions in your website code, update the code as described below replace this code export const encodeshopifyvariantid = (id) => buffer from(`gid //shopify/productvariant/${id}`) tostring('base64') export const decodeshopifyid = (base64id) => { const shopifyid = buffer from(base64id, 'base64') tostring('utf 8') const \[id] = shopifyid split('/') reverse() return id } with this code export const encodeshopifyvariantid = (id) => `gid //shopify/productvariant/${id}` export const decodeshopifyid = (shopifyid) => { const \[id] = shopifyid split('/') reverse() return id } 3\ remove any use of the field presentmentprices shopify no longer supports the deprecated field presentmentprices 4\ update any references to the shopify storefront api version you may have references to the shopify storefront api version in your website code you must update your code to use at least storefront api version 2022 04 , because that will be the oldest version that shopify supports as of january 1, 2023 \we suggest updating all storefront api versions to 2022 07 for consistency searching your code for the shopify storefront api, myshopify com/api , might be helpful to update the version, just change the version in the storefront api path for example, this const path = `https //${shopify subdomain} myshopify com/api/2021 01/graphql json` should be replaced with this const path = `https //${shopify subdomain} myshopify com/api/2022 07/graphql json` if you are querying the storefront api without using @chordcommerce/gatsby theme performance , be sure to check for breaking changes in before upgrading the storefront api version example migration see an example of migrating a gatsby site by checking out how chord migrated the gatsby starter kit