Derive Macro async_graphql_relay::RelayGlobalID [−][src]
#[derive(RelayGlobalID)]
Expand description
RelayGlobalID is used to create a scalar global ID type.
Example
#[derive(RelayGlobalID)] pub struct ID( pub String, /// This type is generated by the macro #[derive(RelayNodeEnum)] and will be in same scope as it pub SchemaNodeTypes, ); // It can then be used on your GraphQL Objects #[derive(SimpleObject)] pub struct Tenant { pub id: ID, // <- See how it uses the ID type defined above pub name: String, }