diff --git a/rust/henka-api/src/main.rs b/rust/henka-api/src/main.rs index d57ed8d..0e64f6b 100644 --- a/rust/henka-api/src/main.rs +++ b/rust/henka-api/src/main.rs @@ -9,9 +9,7 @@ use axum::{ routing::{MethodFilter, MethodRouter, get, on}, }; use juniper::EmptyMutation; -use juniper_axum::{ - extract::JuniperRequest, graphiql, graphql, playground, response::JuniperResponse, ws, -}; +use juniper_axum::{extract::JuniperRequest, graphiql, playground, response::JuniperResponse, ws}; use juniper_graphql_ws::ConnectionConfig; use tokio::net::TcpListener; @@ -36,15 +34,6 @@ async fn homepage() -> Html<&'static str> { .into() } -macro_rules! schema_router { - ($schema:ty) => { - on( - MethodFilter::GET.or(MethodFilter::POST), - graphql::>, - ) - }; -} - macro_rules! subscription_router { ($sub:ty) => { get(ws::>(ConnectionConfig::new(Context { @@ -102,16 +91,9 @@ async fn main() { on(MethodFilter::GET.or(MethodFilter::POST), graphql_handler), ) .route_layer(middleware::from_fn(auth_middleware)) - .route("/priv/graphql", schema_router!(PubSchema)) .route("/subscriptions", subscription_router!(PubSchema)) - .route("/priv/subscriptions", subscription_router!(PubSchema)) .route("/graphiql", gw("/graphql", "/subscriptions")) - .route("/priv/graphiql", gw("/priv/graphql", "/priv/subscriptions")) .route("/playground", pg("/graphql", "/subscriptions")) - .route( - "/priv/playground", - pg("/priv/graphql", "/priv/subscriptions"), - ) .route("/", get(homepage)) .layer(Extension(schema));