asimov-server 25.1.0

ASIMOV Software Development Kit (SDK) for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This is free and unencumbered software released into the public domain.

use axum::{Json, Router, routing::post};

/// See: https://graphql.org/learn/serving-over-http/
/// See: https://graphql.github.io/graphql-over-http/draft/
pub fn routes() -> Router {
    Router::new().route("/graphql", post(query_via_post))
}

/// See: https://graphql.github.io/graphql-over-http/draft/#sec-POST
#[axum::debug_handler]
async fn query_via_post() -> Json<bool> {
    Json(false) // TODO
}