juniper/integration_tests/codegen_fail/fail/interface/fields_duplicate.rs
Kai Ren 3472fe6d10
Fix attributes naming on fields and arguments for interfaces and unions (#806)
Additionally:
- revive macros/tests/object
- revive executor_tests/interfaces_unions
2020-11-14 15:41:01 +02:00

24 lines
390 B
Rust

use juniper::{graphql_interface, GraphQLObject};
#[derive(GraphQLObject)]
#[graphql(impl = CharacterValue)]
pub struct ObjA {
test: String,
}
#[graphql_interface]
impl Character for ObjA {}
#[graphql_interface(for = ObjA)]
trait Character {
fn id(&self) -> &str {
"funA"
}
#[graphql(name = "id")]
fn id2(&self) -> &str {
"funB"
}
}
fn main() {}