I have an issue with combining filtering, ordering and pagination. For a dataset where a person is connected to a number of events, where each event has a type and a timestamp I can do this:
{
persons(id:person.1234) {
person.event (first: 2) @filter(eq(event.type,"BIRTHDAY")) {
event.title
}
}
}
and get 2 results, but if I do this:
{
persons(id:person.1234) {
person.event (first: 2, orderdesc:event.timestamp) @filter(eq(event.type,"BIRTHDAY")) {
event.title
}
}
}
I receive 0 results. If I increase the first to 100, I get 2 results (which is all the dataset contains). It seems the filters, ordering and pagination are applied in the wrong order. What is the use case of pagination not being applied as the last step?
Thanks, for finding the issue. The fix has been merged to master and would be part of the upcoming release.
Wow! 18 hours from report to merge? Impressive.
Most helpful comment
Wow! 18 hours from report to merge? Impressive.