[−][src]Derive Macro async_graphql::GQLEnum
#[derive(GQLEnum)]
{
// Attributes available to this derive:
#[item]
#[graphql]
}Derive a GraphQL enum
You can also use an attribute.
All variants are converted to SCREAMING_SNAKE_CASE.
Examples
use async_graphql::*; #[derive(GQLEnum, Eq, PartialEq, Copy, Clone)] #[graphql(name = "Enum1")] enum MyEnum { One, Two, }