async-graphql/docs/en/src/integrations_to_poem.md
2021-11-16 14:51:20 +08:00

471 B

Poem

Request example

use poem::Route;
use async_graphql_poem::GraphQL;

let app = Route::new()
    .at("/ws", GraphQL::new(schema));

Subscription example

use poem::Route;
use async_graphql_poem::GraphQLSubscription;

let app = Route::new()
    .at("/ws", get(GraphQLSubscription::new(schema)));

More examples

https://github.com/async-graphql/examples/tree/master/poem