Added apis
This commit is contained in:
11
como_api/src/controllers/graphql.rs
Normal file
11
como_api/src/controllers/graphql.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use axum::{routing::get, Router};
|
||||
use como_gql::{graphql_handler, graphql_playground};
|
||||
use como_infrastructure::register::ServiceRegister;
|
||||
|
||||
pub struct GraphQLController;
|
||||
|
||||
impl GraphQLController {
|
||||
pub fn new_router(_service_register: ServiceRegister) -> Router {
|
||||
Router::new().route("/", get(graphql_playground).post(graphql_handler))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user