Skip to content
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

Merged
merged 3 commits into from
Oct 5, 2021
Merged

Conversation

tlgimenes
Copy link
Contributor

@tlgimenes tlgimenes commented Sep 22, 2021

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 to 2. 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 working

vtex-sites/base.store#38

@netlify
Copy link

netlify bot commented Sep 22, 2021

✔️ 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

@tlgimenes tlgimenes changed the base branch from master to feat/api-cart September 22, 2021 14:49
@tlgimenes tlgimenes changed the title feat: Add channel support feat(store-api): Add channel support Sep 22, 2021
@tlgimenes tlgimenes added this to the Store API milestone Sep 22, 2021
@tlgimenes tlgimenes linked an issue Sep 22, 2021 that may be closed by this pull request
@tlgimenes tlgimenes changed the title feat(store-api): Add channel support feat(store-api): Add channel support for fetching products Sep 22, 2021
@tlgimenes tlgimenes changed the title feat(store-api): Add channel support for fetching products feat(store-api): Add channel support for products Sep 22, 2021
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 22, 2021

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:

Sandbox Source
Store UI Typescript Configuration

@tlgimenes tlgimenes marked this pull request as ready for review September 22, 2021 17:52
@tlgimenes tlgimenes requested a review from a team as a code owner September 22, 2021 17:52
Copy link
Contributor

@igorbrasileiro igorbrasileiro left a 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

@tlgimenes tlgimenes force-pushed the feat/api-cart branch 2 times, most recently from 13006bb to 002d984 Compare October 1, 2021 21:19
Base automatically changed from feat/api-cart to master October 4, 2021 17:15
@tlgimenes tlgimenes merged commit 923d343 into master Oct 5, 2021
@tlgimenes tlgimenes deleted the feat/channel branch October 5, 2021 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Channel integration
3 participants