-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(store-api): Add channel support for products #968
Conversation
✔️ Deploy Preview for storeui ready! 🔨 Explore the source changes: 8257f41 🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/615b6c472054d30008dde8e1 😎 Browse the preview: https://deploy-preview-968--storeui.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8257f41:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM the code overall, great job 👏 !
Left 1 comment about addDefaults
13006bb
to
002d984
Compare
fede8ac
to
8994db0
Compare
What's the purpose of this pull request?
This PR adds channel support to our GraphQL layer while retrieving products, a.k.a, search requests
How it works?
Intelligent Search implements channel in a very clever way. Instead of adding an specific dimension (parameter) to their API, they add channel as a facet of the products, so, for retrieving the products from an specific channel, you only need to search for products with that facet.
This PR extends this idea to our GraphQL layer and adds kind of the same interface for product fetching and search.
How to test it?
Go to base.store and change the account to
carrefourbrfood
and change the channel variable to2
. You will be able to navigate on the site and add items to cart. If the channel is wrong, an error will be thrown and you will not be able to add to cart. If you are able to add to cart, this means everything is workingvtex-sites/base.store#38