15 lines
185 B
Rust
15 lines
185 B
Rust
|
use juniper::graphql_object;
|
||
|
|
||
|
struct MyObject {
|
||
|
my_field: i32,
|
||
|
}
|
||
|
|
||
|
#[graphql_object]
|
||
|
impl MyObject {
|
||
|
fn my_field(&self) -> i32 {
|
||
|
self.self.my_field
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {}
|