async-graphql 1.16.9

A GraphQL server library implemented in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# SimpleObject

`SimpleObject` directly map all field of a struct to GraphQL object, you cannot define a resolver function on it.

The example below defined an object `MyObject`, including field `a` and `b`. `c` will be not mapped to GraphQL as it is labelled as `#[field(skip)]`

```rust
use async_graphql::*;

#[SimpleObject]
struct MyObject {
    a: i32,
    b: i32,

    #[field(skip)]
    c: i32,
}
```