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

fix: Top searches #1321

Merged
merged 2 commits into from
May 26, 2022
Merged

fix: Top searches #1321

merged 2 commits into from
May 26, 2022

Conversation

tlgimenes
Copy link
Contributor

@tlgimenes tlgimenes commented May 26, 2022

What's the purpose of this pull request?

Fixes top search results

How it works?

Some accounts require the ?locale being passed to the search API for it to return anything as suggestions. This PR requires the locale to be passed to the api so we forward this data to the search API.

How to test it?

Change account to casinofr and make the following query:

query Suggestions($selectedFacets: [IStoreSelectedFacet!]!) {
  search(first: 10, term:"", selectedFacets: $selectedFacets) {
    suggestions {
      terms
      products {
        name
      }
    }
  }
}

Make sure that when

{
"selectedFacets": [
    {
      "key": "locale",
      "value": "fr-FR"
    }
  ],
}

you receive results. With

{
"selectedFacets": [],
}

you receive nothing

Starters Deploy Preview

@tlgimenes tlgimenes requested a review from a team as a code owner May 26, 2022 19:13
@vercel
Copy link

vercel bot commented May 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
faststore ✅ Ready (Inspect) Visit Preview May 26, 2022 at 7:55PM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 26, 2022

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 ff6fa72:

Sandbox Source
Store UI Typescript Configuration

@tlgimenes tlgimenes merged commit e2ab99d into main May 26, 2022
@tlgimenes tlgimenes deleted the fix/top-searches branch May 26, 2022 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants