Overview
v2 is a ground-up redesign of the SDK. The Shopify Storefront API dependency has been removed, all controllers now expose reactive signals with built-insubscribe(), and the public API surface has been renamed and simplified.
This guide covers every breaking change and provides before/after code snippets to help you migrate.
Install
Initialization
The factory function and its configuration object have been renamed.Config property renames
Removed config options
These options no longer exist in v2 since the Storefront API has been removed:enableStorefrontstorefrontApiVersionproductMetafields/variantMetafields/collectionMetafields/pageMetafieldsoptionscacheMaxProducts
Storefront API removal
v2 builds products entirely from Layers API data. The Storefront API integration has been removed. What this means:- Remove any
@shopify/storefront-api-clientdependency - The
storefront()method no longer exists on the client - Collection metadata (title, description, image) is now fetched via
includeMeta: trueoncollection.execute()rather than from the Storefront API - Product metafields are available through the
metafieldsproperty on theProducttype, sourced from Layers
Controllers
All controllers now have subscribe()
Every controller in v2 exposes a subscribe() method for reacting to state changes without importing signal primitives.
Collection
Search
Search now accepts initial options at creation time and merges parameters acrossexecute() calls.
Autocomplete renamed to suggest
Blocks
Image search
Product type changes
v2 introduces a simplifiedProduct type built entirely from Layers data.
Key differences
- Shallow by default: Products include only the matched variant in
variants. Theprice,compareAtPrice, andavailableForSalefields are sourced from that variant.featuredMediais also sourced from the matched variant, and falls back to the product-level media when the variant has none. To request the full variants array, setflags: { variants: true }increateClient. selectedOptionsis now on the product itself (the matched variant’s options)breakoutOptionsreplaces the previous breakout variant handlingoptionsare nowRichProductOption[]withcodeand optionalswatchcategoryfield added with taxonomy datametafieldsis a nestedRecord<string, Record<string, unknown>>(namespace/key structure)combinedListingParentProductIdandcombinedListingRoleadded for combined listings
Removed product fields
These fields from the Storefront API are no longer present:descriptionHtmlonlineStoreUrlseopublishedAtcollections(useincludeMetaon collection queries instead)
Error handling
Error types have been renamed and restructured.Cache and store
Thestore module has been replaced with a flat cache API.
New in v2
These features are only available in v2:searchContentcontroller for searching articles and blog contentcreateProductCardreactive controller for building product cards with variant selection, option availability, and pricing signalssubscribe()on all controllers for framework-agnostic reactivity- Request deduplication via the built-in
RequestCoordinator temporaryflag on search for one-shot query overrides that don’t persistprepare()on search for warming the API with asearchIdbefore executing- Shallow products for significantly smaller payloads on listing pages