[][src]Derive Macro wundergraph_derive::WundergraphValue

#[derive(WundergraphValue)]
{
    // Attributes available to this derive:
    #[sql_type]
    #[graphql]
}

A custom derive to add support for a custom enum type

Type attributes

  • Required:
    • #[sql_type = "DieselSqlType"]: The sql type the enum maps on diesel side

Variant attributes

All field attributes are optional if no attributes are given the variant name is used as GraphQL name

  • #[graphql(name = "CustomVariantName")]: Set the name of a enum variant to the given custom name.