Update graphql_enum! documentation

This commit is contained in:
Magnus Hallin 2016-10-09 14:53:49 +02:00
parent ac01b8e406
commit ca6c637aa4

View file

@ -9,14 +9,18 @@ non-data carrying Rust enums to GraphQL:
# #[macro_use] extern crate juniper;
enum Color {
Red,
Orange,
Green,
Blue
Blue,
Black,
}
graphql_enum!(Color {
Color::Red => "RED",
Color::Red => "RED" as "The color red",
Color::Orange => "ORANGE",
Color::Green => "GREEN",
Color::Blue => "BLUE",
Color::Black => "BLACK" deprecated "Superseded by ORANGE",
});
# fn main() { }