juniper
juniper copied to clipboard
enhance juniper::GraphQLEnum
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I want to display the integer on enum, like
#[derive(juniper::GraphQLEnum)]
pub enum Gender {
Man = 0,
Woman = 1,
}
and
field something(&executor, name: String) -> FieldResult<Something> {
Ok(Something{
gender: Gender::Man
)
}
when I call it and it will display 0
on gender