Getting actual localized product data
Let’s use the Shopify Storefront API to retrieve market and language scoped product data.
Backend code update
Section titled “Backend code update”- Create an
/appdirectory which contains our business logic. - Add a
product-download.tsfile that that uses Brush-provided Storefront API client to make a GraphQL query. - Store this query in a separate file to keep code clean and make sure to implement the
@inContextto get localized data. - Update
tsconfigfiles to ensure proper TypeScript linting.