Open
Description
Describe the bug
I am experiencing an issue with back pagination, after using last
and before
props with startCursor
of the "nextPage" I can't go back to previous products.
To Reproduce
My query:
query AllProducts($filters: [ProductTaxonomyFilterInput], $minPrice: Float, $maxPrice: Float, $after: String, $first: Int, $last: Int, $before: String) {
products(
first: $first
after: $after
last: $last
before: $before
where: {minPrice: $minPrice, maxPrice: $maxPrice, taxonomyFilter: {filters: $filters} orderby: { field: NAME order: DESC}}
) {
pageInfo {
endCursor
hasNextPage
startCursor
hasPreviousPage
}
nodes {
databaseId
name
slug
}
}
}
Products on the 2 page:
(using the endCursor
tag on after property)
Try to go back to 1 page:
(using the startCursor
tag on before
property and change using first
to last
)
As you can see, there is different products then on page 1, and we didn't get hasPreviousPage: false
Expected behavior
After using before we should go back to previous page
Plugin Versions
- WooGraphQL Version: - 0.21.2
- WPGraphQL Version: - 1.29.3
- WordPress Version: - 6.7.2.
- WooCommerce Version: - 9.4.2
Metadata
Metadata
Assignees
Labels
No labels