Chord OMS
...
Gatsby
Guides
v4.x to v5.x Migration Guide
10min
this major release upgrades the shopify storefront api version to 2023 04 prior to this release, this theme used version 2022 07 of the storefront api upgrading to this release is advised because shopify will stop supporting version 2022 07 of the storefront api on july 1, 2023 major changes these releases contain changes to the price and image objects returned by chord sdk methods, due to underlying shopify storefront api changes these changes are monetary properties shopify storefront api version 2022 10 includes a significant breaking change to monetary fields , so the monetary properties returned by the chord sdk have been renamed to match as of @chordcommerce/gatsby theme performance\@5 0 0 , the following properties are no longer a string, but an object with properties for amount and currencycode (ex {"amount" "0 0", "currencycode" "usd" } ) variant price checkout totaltax checkout subtotalprice checkout totalprice all monetary properties that have a v2 suffix have been renamed without the v2 suffix for example, variant compareatpricev2 is now variant compareatprice these properties are variant pricev2 use variant price instead variant compareatpricev2 use variant compareatprice instead order subtotalpricev2 use order subtotalprice instead order totalpricev2 use order totalprice instead order totalrefundedv2 use order totalrefunded instead order totalshippingpricev2 use order totalshippingprice instead order totaltaxv2 use order totaltax instead order appliedgiftcards amountusedv2 use order appliedgiftcards amountused instead order appliedgiftcards balancev2 use order appliedgiftcards balance instead order shippingline pricev2 use order shippingline price instead checkout paymentduev2 use checkout paymentdue instead checkout totaltaxv2 use checkout totaltax instead checkout subtotalpricev2 use checkout subtotalprice instead checkout totalpricev2 use checkout totalprice instead giftcard amountusedv2 use giftcard amountused instead image source property shopify storefront api version 2022 01 deprecated the originalsrc property of images as of @chordcommerce/gatsby theme performance\@5 0 0 , the originalsrc property of all images has been renamed to url upgrade guide 1\ update dependencies update @chordcommerce/gatsby theme performance to ^5 0 0 if you have @chordcommerce/product rss feed as a dependency, update to ^4 0 0 2\ update monetary properties update code that uses the following properties to handle an object instead of a string (ex {"amount" "0 0", "currencycode" "usd" } ) variant price update to variant price amount checkout totaltax update to checkout totaltax amount checkout subtotalprice update to checkout subtotalprice amount checkout totalprice update to checkout totalprice amount update all monetary properties to drop the v2 suffix for example, update variant compareatpricev2 to variant compareatprice 3\ update product and variant image paths @chordcommerce/gatsby theme performance\@5 0 0 renames the originalsrc property of product and variant images to url for example, this code \<image src={variantimage originalsrc} /> should be replaced with this \<image src={variantimage url} /> 4\ update any references to the shopify storefront api version you may have references to the shopify storefront api version in your website code we suggest updating all storefront api versions to 2023 04 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/2022 07/graphql json` should be replaced with this const path = `https //${shopify subdomain} myshopify com/api/2023 04/graphql json` if you are querying the storefront api without using @chordcommerce/gatsby theme performance , be sure to check for breaking changes 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