diff --git a/CHANGELOG.md b/CHANGELOG.md index f19bbd07..0849b438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fix +- `videos` in productSearch query + + ## [1.69.0] - 2024-03-21 - Parameter `groupBy` into `recommendations` and `productRecommendations` resolvers and `groupByProduct` in `crossSelling` search client. diff --git a/node/resolvers/search/sku.ts b/node/resolvers/search/sku.ts index 3cd10d83..6c0eb3c6 100644 --- a/node/resolvers/search/sku.ts +++ b/node/resolvers/search/sku.ts @@ -65,12 +65,16 @@ export const resolvers = { return variations }, - videos: ({ Videos }: SearchItem) => - map( + videos: ({ Videos, videos }: SearchItem) => { + let sanitizedVideo = Videos ? Videos : videos + + const formattedVideo = sanitizedVideo.map( (video: string) => ({ - videoUrl: video, - }), - Videos - ), + videoUrl: video + }) + ) + + return formattedVideo + } }, } diff --git a/node/typings/Catalog.ts b/node/typings/Catalog.ts index 030a919f..e63f62df 100644 --- a/node/typings/Catalog.ts +++ b/node/typings/Catalog.ts @@ -127,6 +127,7 @@ interface SearchItem { modalType: any | null images: SearchImage[] Videos: string[] + videos: string[] variations: string[] sellers: Seller[] attachments: { @@ -220,7 +221,7 @@ interface CommertialOffer { }[] GetInfoErrorMessage: any | null CacheVersionUsedToCallCheckout: string - // Supports the Intelligent Search API which + // Supports the Intelligent Search API which // uses the same name from the simulation discountHighlights: any[] }