wp-graphql / wp-graphql-woocommerce

Add WooCommerce support and functionality to your WPGraphQL server
https://woographql.com
GNU General Public License v3.0
633 stars 123 forks source link

endcursor fail with duplicate publishdate on quering products #860

Open Whitebytes opened 1 month ago

Whitebytes commented 1 month ago

Describe the bug duplicate publishdates will result in: "hasNextPage": true, "endCursor": null

true indicates the excitence of a next page, but quering the "null" endcorsor brings you right back at the start of pagination.

duplicate publishdates are easely made with the bulkeditor, so we have them a lot.

To Reproduce Steps to reproduce thae behavior:

  1. Make 2 publisdates the same
  2. query products, like: query productsQuery( $where: RootQueryToProductUnionConnectionWhereArgs, $after: String){ products(first: 200, after: $after, where: $where) { pageInfo{ hasNextPage, endCursor } edges{ cursor node{ name } } } } {"where":{"categoryIdIn":[1623],"orderby":[{"field":"DATE","order":"ASC"}]}, "after":"YXJyYXljb25uZWN0aW9uOjI0MjgzMg=="}

Expected behavior values: "hasNextPage": true, "endCursor": null should never coexcist.