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: Add params sponsoredCount query search #2519

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sanderpaniago
Copy link
Collaborator

What's the purpose of this pull request?

Implement the sponsoredCount parameter in the search query, making it possible to control the number of sponsored products returned.

How it works?

A new non-mandatory parameter has been added to the search querry called sponsoredCount, which you just need to set when calling the querry:

query {
  search(first: 12, sponsoredCount: 5) {
    products {
      edges {
        node {
          isVariantOf {
            name
          }
          advertisement {
            adId
            campaignId
            actionCost
            adResponseId
          }
        }
      }
    }
  }
}

How to test it?

Starters Deploy Preview

References

Checklist

You may erase this after checking them all 😉

PR Title and Commit Messages

  • PR title and commit messages follow the Conventional Commits specification
    • Available prefixes: feat, fix, chore, docs, style, refactor and test

PR Description

  • Added a label according to the PR goal - breaking change, bug, contributing, performance, documentation..

Dependencies

  • Committed the yarn.lock file when there were changes to the packages

@sanderpaniago sanderpaniago added enhancement New feature or request contributing Pull request submitted by the community labels Oct 23, 2024
@sanderpaniago sanderpaniago requested a review from a team as a code owner October 23, 2024 15:17
@sanderpaniago sanderpaniago requested review from lucasfp13 and lariciamota and removed request for a team October 23, 2024 15:17
Copy link

vercel bot commented Oct 23, 2024

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

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 8:35pm

Copy link

codesandbox-ci bot commented Oct 23, 2024

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.

@pedromtec
Copy link
Contributor

@sanderpaniago. The CI is failing. I think you need to update the unit tests.

@sanderpaniago
Copy link
Collaborator Author

@pedromtec resolvido o erro no CI

@gvc
Copy link
Contributor

gvc commented Nov 19, 2024

How will our customers set the sponsoredCount? From what I've seen in the code it's only possible via an override?

@sanderpaniago
Copy link
Collaborator Author

It will be a parameter passed in the search query

Copy link
Contributor

@pedromtec pedromtec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. I have a question (non-blocking) . At what point does this parameter go to the query string? Will this be done in another PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants