Adding `.order_by(gitlab::api::projects::ProjectOrderBy::Id)` to `Projects` query breaks/disables pagination
I have a GitLab instance (12.9.0-ee) with with a few hundred repositories visible to my user. If I run the following:
fn projects_list(gitlab: &gitlab::Gitlab) -> Vec<gitlab::Project> {
gitlab::api::paged(
gitlab::api::projects::Projects::builder()
// .order_by(gitlab::api::projects::ProjectOrderBy::Id) // use keyset pagination
.build()
.unwrap(),
gitlab::api::Pagination::All,
)
.query(gitlab)
.unwrap()
}
fn main() {
...
info!("number of projects: {}", projects_list(&gitlab).len());
}
It prints:
number of projects: 203
If I uncomment the .order_by(gitlab::api::projects::ProjectOrderBy::Id)
line it prints:
number of projects: 100
I would like to use that ordering to enable keyset pagination for slightly faster queries.
It looks like there is code in place to support keyset pagination in this library, but since I'm only getting one page of results it appears to be broken.