a3fda7363d
- preserve and reuse defined impl blocks in #[graphql_object] and #[graphql_subscription] macros expansion - allow renaming `ScalarValue` type parameter in expanded code via `scalar = S: ScalarValue` syntax Additionally: - rename `rename` attribute's argument to `rename_all` - support `rename_all` in #[graphql_interface] macro
17 lines
216 B
Rust
17 lines
216 B
Rust
use juniper::graphql_object;
|
|
|
|
struct ObjA;
|
|
|
|
#[graphql_object]
|
|
impl ObjA {
|
|
fn id(&self) -> &str {
|
|
"funA"
|
|
}
|
|
|
|
#[graphql(name = "id")]
|
|
fn id2(&self) -> &str {
|
|
"funB"
|
|
}
|
|
}
|
|
|
|
fn main() {}
|