juniper_relay_helpers 0.3.1

Helper macros, structs and functions for working with Relay and Juniper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::Cursor;

/// Trait encapsulating common parts of a Relay Edge.
pub trait RelayEdge {
    type NodeType;

    /// New type taking a Cursor implementation
    fn new(node: Self::NodeType, cursor: impl Cursor) -> Self;

    /// New type taking a string cursor
    fn new_raw_cursor(node: Self::NodeType, cursor: Option<String>) -> Self;
}