diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a2c422..c3446d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- new `productSearchNoSimulations` query ## [0.37.1] - 2019-11-12 ### Added diff --git a/react/Queries.js b/react/Queries.js index 5bc1ebf..30cf729 100644 --- a/react/Queries.js +++ b/react/Queries.js @@ -11,6 +11,7 @@ import address from './queries/address.gql' import searchMetadata from './queries/searchMetadata.gql' import productCategoryTree from './queries/UNSTABLE__productCategoryTree.gql' import facets from './queries/facets.gql' +import productSearchNoSimulations from './queries/productSearchNoSimulations.gql' export default { address, @@ -26,4 +27,5 @@ export default { UNSTABLE__productCategoryTree: productCategoryTree, searchMetadata, facets, + productSearchNoSimulations } diff --git a/react/queries/productSearchNoSimulations.gql b/react/queries/productSearchNoSimulations.gql new file mode 100644 index 0000000..c2fa36b --- /dev/null +++ b/react/queries/productSearchNoSimulations.gql @@ -0,0 +1,116 @@ +query productSearchNoSimulations( + $query: String + $map: String + $orderBy: String + $priceRange: String + $from: Int + $to: Int + $hideUnavailableItems: Boolean = false + $skusFilter: ItemsFilter = ALL_AVAILABLE +) { + productSearchNoSimulations( + query: $query + map: $map + orderBy: $orderBy + priceRange: $priceRange + from: $from + to: $to + hideUnavailableItems: $hideUnavailableItems + ) @context(provider: "vtex.search-graphql") { + products { + productId + description + productName + productReference + linkText + brand + brandId + link + categories + specificationGroups { + name + specifications { + name + values + } + } + items(filter: $skusFilter) { + itemId + name + nameComplete + complementName + ean + variations { + name + values + } + referenceId { + Key + Value + } + measurementUnit + unitMultiplier + images { + cacheId + imageId + imageLabel + imageTag + imageUrl + imageText + } + sellers { + sellerId + sellerName + commertialOffer { + skippedSimulation + discountHighlights { + name + } + teasers { + name + conditions { + minimumQuantity + parameters { + name + value + } + } + effects { + parameters { + name + value + } + } + } + Installments(criteria: MAX) { + Value + InterestRate + TotalValuePlusInterestRate + NumberOfInstallments + Name + } + Price + ListPrice + PriceWithoutDiscount + RewardValue + PriceValidUntil + AvailableQuantity + } + } + } + productClusters { + id + name + } + properties { + name + values + } + } + recordsFiltered + breadcrumb { + name + href + } + } +} diff --git a/react/queries/productSearchV2.gql b/react/queries/productSearchV2.gql index e8974de..ebe27b7 100644 --- a/react/queries/productSearchV2.gql +++ b/react/queries/productSearchV2.gql @@ -13,6 +13,7 @@ query productSearchV2( $withFacets: Boolean = true $hideUnavailableItems: Boolean = false $skusFilter: ItemsFilter = ALL_AVAILABLE + $skipBreadcrumb: Boolean = false ) { productSearch( query: $query @@ -82,6 +83,7 @@ query productSearchV2( sellerId sellerName commertialOffer { + skippedSimulation discountHighlights { name } @@ -127,7 +129,7 @@ query productSearchV2( } } recordsFiltered - breadcrumb { + breadcrumb @skip(if: $skipBreadcrumb) { name href }