juniper/integration_tests/codegen_fail/fail/union/impl_enum_field.rs

24 lines
346 B
Rust
Raw Normal View History

#[derive(juniper::GraphQLEnum)]
#[graphql(context = ())]
pub enum Test {
A,
B,
}
enum Character {
Test(Test),
}
#[juniper::graphql_union]
impl Character {
fn resolve(&self) {
match self {
Test => match *self {
Character::Test(ref h) => Some(h),
},
}
}
}
fn main() {}