reactive_graph_plugin_graphql_web/lib.rs
1use actix_web::post;
2use actix_web::web;
3use async_graphql_actix_web::GraphQLRequest;
4use async_graphql_actix_web::GraphQLResponse;
5
6use reactive_graph_plugin_graphql_schema::PluginSchema;
7
8#[post("/plugin/graphql")]
9pub async fn query_plugin_graphql(schema: web::Data<PluginSchema>, request: GraphQLRequest) -> GraphQLResponse {
10 schema.execute(request.into_inner()).await.into()
11}