Skip to content

Commit ca6c637

Browse files
committed
Update graphql_enum! documentation
1 parent ac01b8e commit ca6c637

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/macros/enums.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ non-data carrying Rust enums to GraphQL:
99
# #[macro_use] extern crate juniper;
1010
enum Color {
1111
Red,
12+
Orange,
1213
Green,
13-
Blue
14+
Blue,
15+
Black,
1416
}
1517
1618
graphql_enum!(Color {
17-
Color::Red => "RED",
19+
Color::Red => "RED" as "The color red",
20+
Color::Orange => "ORANGE",
1821
Color::Green => "GREEN",
1922
Color::Blue => "BLUE",
23+
Color::Black => "BLACK" deprecated "Superseded by ORANGE",
2024
});
2125
2226
# fn main() { }

0 commit comments

Comments
 (0)