Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi! I'm trying to convert this collectionByHandle to the latest:
val promotedProducts: Storefront.QueryRootQuery = Storefront.query { rootQuery -> rootQuery.collectionByHandle(BuildConfig.COLLECTION_PROMOTED_PRODUCTS) { collectionQuery -> collectionQuery.products( { it.first(PROMOTED_PRODUCTS_COUNT) }, { productConnectionQuery -> productConnectionQuery.edges { productEdgeQuery -> productEdgeQuery.node { productQuery -> // ...
I've been trying different things for way too long, so I thought I'd ask for help, please. My best try is this, which still doesn't compile:
rootQuery.collections(first: PROMOTED_PRODUCTS_COUNT, query: BuildConfig.COLLECTION_PROMOTED_PRODUCTS) { collections -> }
Thank you in advance!