juniper_relay_helpers 0.7.0

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

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

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