async-graphql 2.0.13

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
use async_graphql::*;

#[async_std::test]
pub async fn test_schema_default() {
    #[derive(Default)]
    struct QueryRoot;

    #[Object]
    impl QueryRoot {
        async fn value(&self) -> i32 {
            10
        }
    }

    type MySchema = Schema<QueryRoot, EmptyMutation, EmptySubscription>;

    let _schema = MySchema::default();
}