1 2 3 4 5 6 7 8 9 10 11 12
use axum::Router; use axum::routing::post_service; use crate::gql::GraphQLService; pub fn router<S>() -> Router<S> where S: Clone + Send + Sync + 'static, { let service = GraphQLService::new(); Router::new().route("/graphql", post_service(service)) }