Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Releases: sanity-io/hydrogen-plugin-sanity

v0.4.0

26 Apr 10:46
Compare
Choose a tag to compare

Breaking changes

  • 0.4.0 of this plugin now requires @shopify/hydrogen >= 0.13.0 due to breaking changes with Hydrogen's fetchBuilder method. (Usage of hydrogen-plugin-sanity remains unchanged)

v0.3.0

02 Mar 21:51
Compare
Choose a tag to compare

Breaking changes

  • As of Hydrogen 0.10 it's no longer possible to store Sanity config in shopify.config.js.
  • Sanity configuration must now be explicitly passed into every hook call in a corresponding clientConfig object, e.g.
const {sanityData} = useSanityQuery({
  query: `*[_id == $homeId][0]{
    ...,
    featuredProducts[] {
      _id,
      images[] {
        asset {
          _id
        }
      }
    }
  }`,
  params: {homeId: 'homepage'}
  clientConfig: {
    projectId: 'yourSanityProjectId',
    dataset: 'production',
    apiVersion: 'v2021-06-07'
  }
})