- examples to fix still - error_extensions.md ResultExt example does not compile! - trait ErrorExtensions is not implemented for ParseIntError - dataloader - requires sqlx to work. So we either "stub" it OR we rewrite them simpler to use a simple "faux" db library
1002 B
1002 B
Poem
Request example
# extern crate async_graphql_poem;
# extern crate async_graphql;
# extern crate poem;
# use async_graphql::*;
# #[derive(Default, SimpleObject)]
# struct Query { a: i32 }
# let schema = Schema::build(Query::default(), EmptyMutation, EmptySubscription).finish();
use poem::Route;
use async_graphql_poem::GraphQL;
let app = Route::new()
.at("/ws", GraphQL::new(schema));
Subscription example
# extern crate async_graphql_poem;
# extern crate async_graphql;
# extern crate poem;
# use async_graphql::*;
# #[derive(Default, SimpleObject)]
# struct Query { a: i32 }
# let schema = Schema::build(Query::default(), EmptyMutation, EmptySubscription).finish();
use poem::{get, Route};
use async_graphql_poem::GraphQLSubscription;
let app = Route::new()
.at("/ws", get(GraphQLSubscription::new(schema)));