be2628875f
When using cursors for pagination while sorting, the sort order was inverted (desc -> asc, asc -> desc). However, this was then not considered when selecting results based on the cursor. For before/after results where always selected via greater/less. Due to inverting the sort order, this also needs to be inverted depending on the sort order (desc or asc).