juniper/integration_tests/codegen_fail/fail/interface/missing_field_argument.rs
ilslv 1aa1000c3b
Redesign #[graphql_interface] macro (#1009, #1000, #814)
- remove support for `#[graphql_interface(dyn)]`
- describe all interface trait methods with type's fields or impl block instead of `#[graphql_interface]` attribute on `impl Trait`
- forbid default impls on non-skipped trait methods
- support additional nullable arguments on implementer
- support returning sub-type on implementer
2022-01-26 20:58:53 +02:00

19 lines
308 B
Rust

use juniper::{graphql_interface, graphql_object};
pub struct ObjA {
id: String,
}
#[graphql_object(impl = CharacterValue)]
impl ObjA {
fn id(&self) -> &String {
&self.id
}
}
#[graphql_interface(for = ObjA)]
trait Character {
fn id(&self, is_present: bool) -> &str;
}
fn main() {}