async-graphql/tests/schema.rs

19 lines
346 B
Rust
Raw Normal View History

2020-08-28 06:19:35 +00:00
use async_graphql::*;
#[async_std::test]
pub async fn test_schema_default() {
#[derive(Default)]
struct QueryRoot;
2020-08-28 06:19:35 +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();
}