async-graphql/src/types/connection/page_info.rs
Sunli ada2597130
New data source (#105)
* New data source
2020-05-28 08:02:00 +08:00

18 lines
509 B
Rust

use async_graphql_derive::SimpleObject;
/// Information about pagination in a connection
#[SimpleObject(internal)]
pub struct PageInfo {
/// When paginating backwards, are there more items?
pub has_previous_page: bool,
/// When paginating forwards, are there more items?
pub has_next_page: bool,
/// When paginating backwards, the cursor to continue.
pub start_cursor: Option<String>,
/// When paginating forwards, the cursor to continue.
pub end_cursor: Option<String>,
}