diff --git a/rust/crates/web/src/app.rs b/rust/crates/web/src/app.rs index 1cedbfb..0a85ee3 100644 --- a/rust/crates/web/src/app.rs +++ b/rust/crates/web/src/app.rs @@ -3,9 +3,9 @@ use std::sync::Arc; use async_graphql::{EmptySubscription, Schema}; use crate::{ + handler::graphql::query::QueryRoot, infra::store::InMemoryStore, mutation::MutationRoot, - query::QueryRoot, use_case::{HasSchema, HasStore, Store}, }; diff --git a/rust/crates/web/src/handler.rs b/rust/crates/web/src/handler.rs index 3ba36b1..989b878 100644 --- a/rust/crates/web/src/handler.rs +++ b/rust/crates/web/src/handler.rs @@ -1,4 +1,4 @@ -mod graphql; +pub mod graphql; mod root; use axum::Router; diff --git a/rust/crates/web/src/handler/graphql.rs b/rust/crates/web/src/handler/graphql.rs index faf59b3..112b436 100644 --- a/rust/crates/web/src/handler/graphql.rs +++ b/rust/crates/web/src/handler/graphql.rs @@ -1,3 +1,5 @@ +pub mod query; + use std::sync::Arc; use async_graphql::http::GraphiQLSource; diff --git a/rust/crates/web/src/query.rs b/rust/crates/web/src/handler/graphql/query.rs similarity index 96% rename from rust/crates/web/src/query.rs rename to rust/crates/web/src/handler/graphql/query.rs index afaeec8..1200826 100644 --- a/rust/crates/web/src/query.rs +++ b/rust/crates/web/src/handler/graphql/query.rs @@ -3,7 +3,6 @@ mod check_list; mod item; use async_graphql::Context; -use axum::headers::authorization::Bearer; use crate::handler::Data; diff --git a/rust/crates/web/src/query/check.rs b/rust/crates/web/src/handler/graphql/query/check.rs similarity index 100% rename from rust/crates/web/src/query/check.rs rename to rust/crates/web/src/handler/graphql/query/check.rs diff --git a/rust/crates/web/src/query/check_list.rs b/rust/crates/web/src/handler/graphql/query/check_list.rs similarity index 100% rename from rust/crates/web/src/query/check_list.rs rename to rust/crates/web/src/handler/graphql/query/check_list.rs diff --git a/rust/crates/web/src/query/item.rs b/rust/crates/web/src/handler/graphql/query/item.rs similarity index 100% rename from rust/crates/web/src/query/item.rs rename to rust/crates/web/src/handler/graphql/query/item.rs diff --git a/rust/crates/web/src/main.rs b/rust/crates/web/src/main.rs index aadf313..2823bb0 100644 --- a/rust/crates/web/src/main.rs +++ b/rust/crates/web/src/main.rs @@ -3,7 +3,6 @@ mod handler; mod infra; mod model; mod mutation; -mod query; #[cfg(test)] mod test_utils; mod use_case; diff --git a/rust/crates/web/src/use_case.rs b/rust/crates/web/src/use_case.rs index b59bf62..17c00fc 100644 --- a/rust/crates/web/src/use_case.rs +++ b/rust/crates/web/src/use_case.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use async_graphql::{EmptySubscription, Schema}; use axum::async_trait; -use crate::{model, mutation, query}; +use crate::{model, mutation}; #[derive(Clone, Debug, thiserror::Error)] pub enum Error { @@ -24,7 +24,9 @@ pub trait Store { pub trait HasSchema { // TODO: query, mutation, subscription - fn schema(&self) -> &Schema; + fn schema( + &self, + ) -> &Schema; } pub trait HasStore {