2020-09-13 03:41:15 +00:00
|
|
|
use crate::GQLSimpleObject;
|
2020-03-19 09:20:12 +00:00
|
|
|
|
2020-05-05 22:52:04 +00:00
|
|
|
/// Information about pagination in a connection
|
2020-09-13 03:41:15 +00:00
|
|
|
#[derive(GQLSimpleObject)]
|
|
|
|
#[graphql(internal)]
|
2020-03-19 09:20:12 +00:00
|
|
|
pub struct PageInfo {
|
2020-05-28 00:02:00 +00:00
|
|
|
/// When paginating backwards, are there more items?
|
2020-05-05 22:52:04 +00:00
|
|
|
pub has_previous_page: bool,
|
2020-03-19 09:20:12 +00:00
|
|
|
|
2020-05-28 00:02:00 +00:00
|
|
|
/// When paginating forwards, are there more items?
|
2020-05-05 22:52:04 +00:00
|
|
|
pub has_next_page: bool,
|
2020-03-19 09:20:12 +00:00
|
|
|
|
2020-05-28 00:02:00 +00:00
|
|
|
/// When paginating backwards, the cursor to continue.
|
|
|
|
pub start_cursor: Option<String>,
|
2020-03-19 09:20:12 +00:00
|
|
|
|
2020-05-28 00:02:00 +00:00
|
|
|
/// When paginating forwards, the cursor to continue.
|
|
|
|
pub end_cursor: Option<String>,
|
2020-03-19 09:20:12 +00:00
|
|
|
}
|