@@ -10,9 +10,9 @@ como_core = { path = "../como_core" }
|
||||
como_domain = { path = "../como_domain" }
|
||||
como_infrastructure = { path = "../como_infrastructure" }
|
||||
|
||||
async-graphql = "4.0.6"
|
||||
async-graphql-axum = "*"
|
||||
axum = "0.5.13"
|
||||
async-graphql = "5.0.9"
|
||||
async-graphql-axum = "5.0.9"
|
||||
axum.workspace = true
|
||||
axum-extra = { version = "*", features = ["cookie", "cookie-private"] }
|
||||
axum-sessions = { version = "*" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@@ -4,8 +4,6 @@ use como_domain::{
|
||||
item::{
|
||||
queries::{GetItemQuery, GetItemsQuery},
|
||||
requests::CreateItemDto,
|
||||
responses::CreatedItemDto,
|
||||
ItemDto,
|
||||
},
|
||||
projects::{
|
||||
queries::{GetProjectQuery, GetProjectsQuery},
|
||||
|
@@ -21,6 +21,14 @@ pub async fn graphql_handler(
|
||||
Ok(schema.execute(req).await.into())
|
||||
}
|
||||
|
||||
//fn get_token_from_headers(headers: &HeaderMap) -> Option<Token> {
|
||||
// headers.get("Authorization").and_then(|value| {
|
||||
// let value = value.to_str().ok()?;
|
||||
// let value = value.strip_prefix("Bearer ")?;
|
||||
// Some(Token(value.to_string()))
|
||||
// })
|
||||
//}
|
||||
|
||||
pub async fn graphql_playground() -> impl IntoResponse {
|
||||
Html(playground_source(GraphQLPlaygroundConfig::new("/graphql")))
|
||||
}
|
||||
|
Reference in New Issue
Block a user