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

Filter for Promotions #6738

Merged
merged 3 commits into from Jan 30, 2023
Merged

Filter for Promotions #6738

merged 3 commits into from Jan 30, 2023

Conversation

sujithvn
Copy link
Contributor

@sujithvn sujithvn commented Jan 1, 2023

Signed-off-by: Sujith mail.sujithvn@gmail.com

Resolves #6689
Impact: minor
Type: feature

Issue

Add filtering for Promotions collection like was done for Customer/Orders (Ticket #6689)

Solution

Added new query endpoint filterPromotions which will provide the requested feature.
To get a list of available fields and their type, the UI could use the new query end-point introspectSchema (currently in PR status).

Breaking changes

None.
But for passing the validate permissions, we need an entry ["reaction:legacy:promotions", "read"] which is handled in the PR #6732

Testing

Unit test for the common query function is already included in the Filter PR (6684). This PR is only adding the new end-point in the same format

Signed-off-by: Sujith <mail.sujithvn@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 1, 2023

🦋 Changeset detected

Latest commit: e4dfe64

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@reactioncommerce/api-plugin-promotions Minor
reaction Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Signed-off-by: Sujith <mail.sujithvn@gmail.com>
@sujithvn sujithvn requested review from vanpho93 and zenweasel and removed request for vanpho93 January 1, 2023 11:07
Signed-off-by: Sujith <mail.sujithvn@gmail.com>
Copy link
Collaborator

@zenweasel zenweasel left a comment

Choose a reason for hiding this comment

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

One copy-pasta in the GraphQL description but otherwise it looks good

@@ -315,4 +339,34 @@ extend type Query {

sortOrder: String
): PromotionConnection!

"Query to get a filtered list of Accounts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy pasta

@zenweasel zenweasel merged commit e73f2c9 into feat/promotions Jan 30, 2023
@zenweasel zenweasel deleted the filter-for-promotions branch January 30, 2023 21:18
vanpho93 pushed a commit that referenced this pull request Apr 24, 2023
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.

None yet

3 participants