2020-08-28 06:19:35 +00:00
|
|
|
use async_graphql::*;
|
|
|
|
|
|
|
|
#[async_std::test]
|
|
|
|
pub async fn test_schema_default() {
|
2020-10-20 03:49:31 +00:00
|
|
|
#[derive(Default)]
|
|
|
|
struct QueryRoot;
|
2020-08-28 06:19:35 +00:00
|
|
|
|
2020-10-20 03:49:31 +00:00
|
|
|
#[Object]
|
|
|
|
impl QueryRoot {
|
|
|
|
async fn value(&self) -> i32 {
|
|
|
|
10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type MySchema = Schema<QueryRoot, EmptyMutation, EmptySubscription>;
|
2020-08-28 06:19:35 +00:00
|
|
|
|
|
|
|
let _schema = MySchema::default();
|
|
|
|
}
|