Work with third-party data
Hydrogen can also support data from third-party sources. If you want to use Hydrogen components with a third-party data source, then data from the third-party source must first be transformed into the types expected by the Hydrogen components, hooks, and utilities, and then passed on to the components, hooks, and utilities.
This guide explains how to perform some common tasks.
Use Hydrogen components with a third-party data sourceAnchor link to section titled "Use Hydrogen components with a third-party data source"
To support third-party data, the third party needs to build an adapter that transforms the data into the types expected by Hydrogen. If you choose to use a third-party data source, then you can query it in your custom storefront code.
For example, a third-party data source might return product data with a different structure:
ProductOptionsProvider component to use the product data coming from the third-party data source, the data needs to be translated into the format that the
ProductOptionsProvider component expects.
For example, the following function converts a third-party data source into the type returned by the Storefront API:
Fetch supplementary dataAnchor link to section titled "Fetch supplementary data"
If you want to fetch data that goes alongside your Shopify product data and shopping experience, like CMS content from another provider, then you can render your own component by implementing the