pub struct GraphqlPagination {
pub has_next_page_path: String,
pub cursor_path: String,
pub cursor_variable: String,
pub page_size_variable: String,
}Expand description
Cursor-based pagination configuration for GraphQL.
Most GraphQL APIs use the Relay cursor specification with
pageInfo { hasNextPage, endCursor }.
Fields§
§has_next_page_path: StringJSONPath to the hasNextPage boolean in the response.
cursor_path: StringJSONPath to the endCursor string in the response.
cursor_variable: StringName of the cursor variable in the GraphQL query (default: "after").
page_size_variable: StringName of the page size variable (default: "first").
The per-page record count itself comes from
GraphqlStreamConfig::batch_size — the variable named here is the
GraphQL variable that the batch_size value is injected into on each
request. The plain batch_size = 0 sentinel omits the variable so the
upstream uses its own default page size.
Trait Implementations§
Source§impl Clone for GraphqlPagination
impl Clone for GraphqlPagination
Source§fn clone(&self) -> GraphqlPagination
fn clone(&self) -> GraphqlPagination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphqlPagination
impl Debug for GraphqlPagination
Source§impl Default for GraphqlPagination
impl Default for GraphqlPagination
Source§impl<'de> Deserialize<'de> for GraphqlPagination
impl<'de> Deserialize<'de> for GraphqlPagination
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for GraphqlPagination
impl JsonSchema for GraphqlPagination
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GraphqlPagination
impl RefUnwindSafe for GraphqlPagination
impl Send for GraphqlPagination
impl Sync for GraphqlPagination
impl Unpin for GraphqlPagination
impl UnsafeUnpin for GraphqlPagination
impl UnwindSafe for GraphqlPagination
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more