async-graphql/tests/schema.rs
Sunli e3d693da28 Add entity lookup support for MergedObject.
Add some GraphQL specification constraints for all derived macros.

Use `Registry::create_dummy_type` to create a merged type.
2020-10-20 11:49:31 +08:00

19 lines
346 B
Rust

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();
}