Skip to content

Commit

Permalink
Added variant to facets query (#187)
Browse files Browse the repository at this point in the history
#### What is the purpose of this pull request?

- ditto.

Depends on: vtex-apps/search-graphql#143

#### What problem is this solving?

- Allow A/B testing

#### How should this be manually tested?


[Workspace](https://felipe--biggy.myvtex.com/_v/private/[email protected]/graphiql/v1?query=query%20%7B%0A%20%20facets(variant%3A%22ds%22)%20%7B%0A%20%20%20%20priceRanges%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D)

#### Screenshots or example usage


![another](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExN2JvY2dkOXpjMHRmMGJ6b2JoMW05dzV2MGVkNDlscnl4dzJhZDV5MiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/qgri3D9sTwCUGMcT8L/giphy.gif)

#### Types of changes

* [ ] Bug fix (a non-breaking change which fixes an issue)
* [x] New feature (a non-breaking change which adds functionality)
* [ ] Breaking change (fix or feature that would cause existing
functionality to change)
* [ ] Requires change to documentation, which has been updated
accordingly.
  • Loading branch information
salesfelipe authored Oct 30, 2024
1 parent eb0daa1 commit bcee042
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- `variant` to `facets` query, used to execute A/B tests.

## [0.100.0] - 2024-10-16

## [0.99.0] - 2024-09-16
Expand Down
2 changes: 2 additions & 0 deletions react/queries/facetsV2.gql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ query facetsV2(
$from: Int
$to: Int
$initialAttributes: String
$variant: String
) {
facets(
query: $query
Expand All @@ -23,6 +24,7 @@ query facetsV2(
operator: $operator
searchState: $searchState
initialAttributes: $initialAttributes
variant: $variant
) @context(provider: "vtex.search-graphql") {
sampling
breadcrumb {
Expand Down

0 comments on commit bcee042

Please sign in to comment.