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: product connection resolution refactored to better work with the ProductQuery class #880

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

kidunot89
Copy link
Member

@kidunot89 kidunot89 commented Aug 1, 2024

Your checklist for this pull request

Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Make sure you are requesting to pull request from a topic/feature/bugfix/devops branch (right side). Don't pull request from your master!
  • Have you ensured/updated that CLI tests to extend coverage to any new logic. Learn how to modify the tests here.

What does this implement/fix? Explain your changes.

Fixes several issues with filter and sorting the product connections. This includes but is not limited to:

  • minPrice: Fixed and working as expected.
  • maxPrice: Fixed and working as expected.
  • orderby: Fixed, however some potential breaking changes have occurred. Continue below

A few values for the ProductsOrderbyEnum have been deprecated or removed.

  • SALE_PRICE: "Use PRICE instead. Previous functionality powering this value is no longer accessible"
  • REGULAR_PRICE: "Use PRICE instead. Previous functionality powering this value is no longer accessible"
  • ON_SALE_FROM: "No substitute available at the time or writing. Previous functionality powering this value is no longer accessible."
  • ON_SALE_TO: "No substitute available at the time or writing. Previous functionality powering this value is no longer accessible."
  • TOTAL_SALES: "Use "POPULARITY" instead, it's powered by the same functionality under-the-hood."
  • RELEVANCE: "Removed completely, as the only usage I can find for it is in combination with search, and currently serve as the default sort type when the search param is used.

Does this close any currently open issues?

FIxes #877
Resolves #845

Any relevant logs, error output, GraphiQL screenshots, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?

Where has this been tested?

  • WooGraphQL Version:
  • WPGraphQL Version:
  • WordPress Version:
  • WooCommerce Version:

@kidunot89 kidunot89 marked this pull request as ready for review August 6, 2024 21:25
@kidunot89 kidunot89 merged commit d9d968a into wp-graphql:develop Aug 6, 2024
15 checks passed
@kidunot89 kidunot89 added bugfix Implements bugfix breaking change Solution will break some older solutions labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Solution will break some older solutions bugfix Implements bugfix
Projects
None yet
1 participant