Derive Macro RelayNodeObject

Source
#[derive(RelayNodeObject)]
{
    // Attributes available to this derive:
    #[relay]
}
Expand description

The RelayNodeObject macro is applied to a type to automatically implement the RelayNodeStruct trait.

#[derive(SimpleObject, RelayNodeObject)] // See the 'RelayNodeObject' derive macro
#[graphql(complex)]
#[relay(node_suffix = "u")] // This controls the 'RelayNodeObject' macro. In this case the prefix is shortened to 'u', the default is in the name of the struct.
pub struct User {
    pub id: RelayNodeID<User>,
    pub name: String,
    pub role: String,
}