Minor Changes
-
#1028
ba174588
Thanks @michenly! - Starting from SF API version2022-04
, the preferred way to request translatable resources is using the@inContext
directive. See the API docs on how to do this and which resources have translatable properties.This causes a breaking change to the
useShopQuery
hook. Thelocale
property has been removed from the argument object;Accept-Language
is no longer being send with every request, and we are no longer using locale as part of the cache key.The
useShop
hook will now return thelanguageCode
key, which is the first two characters of the existinglocale
key.Both
locale
&languageCode
values are also now capitalized to make it easier to pass into a GraphQL@inContext
directive. -
#1020
e9529bc8
Thanks @jplhomer! - PreloadLink
URLs by default when a user signals intent to visit the URL. This includes hovering or focusing on the URL. To disable preloading, pass<Link preload={false} />
to the component.
Patch Changes
-
#1017
4c87fb63
Thanks @frandiox! - Do not cache Storefront API responses that contain GraphQL errors (amend previous fix). -
#1026
836b064d
Thanks @frehner! - Updated the Typescript types and GraphQL schema to the newest updates from Storefront API 2022-04. Of note in this update is the ability to skipedges
and go directly tonode
, for example:product.nodes[0]
instead ofproduct.edges[0].node
-
#1032
03488083
Thanks @jplhomer! - Catch hydration errors related to experimental server components bugs and prevent them from being logged in production. -
#1037
13376efb
Thanks @jplhomer! - Use new header for private Storefront token