You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the release of v0.10.0, I was happy to see that upstream pagination fixes were included for products, including when sorting by numerical values such as price.
However, reverse pagination still seems to be broken when the list is sorted by numerical values such as price and total sales.
To Reproduce
Steps to reproduce the behavior:
Install a fresh, minimally reproducible environment. I can email / slack a wplocal zip export of this for your reference. The only plugins installed are WooCommerce 5.4.1, WP GraphQL 1.4.2 and WooGraphQL 0.10.0
I created a set of Products (Product A-F) with various prices that seemed to cause sorting issues in the past, so far so good as they are sorted properly when ascending by price:
If I keep the sort variables (by price ascending), but want to pluck the last two products before "Product D", here's what I get:
Expected behavior
The expected result based on the query from the entire list in Step 2 should be an array of "Product G" followed by "Product C".
The same thing happens when sorting by TOTAL_SALES. As far as I can see, it may be interpreting "before" as "after" in reverse pagination. See the screenshot below for expected vs actual:
Plugin Versions
WooGraphQL Version: 0.10.0
WPGraphQL Version: 1.4.2
WordPress Version: 5.7.2
WooCommerce Version: 5.4.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
With the release of v0.10.0, I was happy to see that upstream pagination fixes were included for products, including when sorting by numerical values such as price.
However, reverse pagination still seems to be broken when the list is sorted by numerical values such as price and total sales.
To Reproduce
Steps to reproduce the behavior:
Install a fresh, minimally reproducible environment. I can email / slack a wplocal zip export of this for your reference. The only plugins installed are WooCommerce 5.4.1, WP GraphQL 1.4.2 and WooGraphQL 0.10.0
I created a set of Products (Product A-F) with various prices that seemed to cause sorting issues in the past, so far so good as they are sorted properly when ascending by price:
Expected behavior
The expected result based on the query from the entire list in Step 2 should be an array of "Product G" followed by "Product C".
The same thing happens when sorting by TOTAL_SALES. As far as I can see, it may be interpreting "before" as "after" in reverse pagination. See the screenshot below for expected vs actual:
Plugin Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: