Skip to content

Commit

Permalink
Move mutation mod to handler::graphql::mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Nov 20, 2023
1 parent 0978734 commit d1fa7a7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust/crates/web/src/app.rs
Expand Up @@ -3,9 +3,9 @@ use std::sync::Arc;
use async_graphql::{EmptySubscription, Schema};

use crate::{
handler::graphql::mutation::MutationRoot,
handler::graphql::query::QueryRoot,
infra::store::InMemoryStore,
mutation::MutationRoot,
use_case::{HasSchema, HasStore, Store},
};

Expand Down
1 change: 1 addition & 0 deletions rust/crates/web/src/handler/graphql.rs
@@ -1,3 +1,4 @@
pub mod mutation;
pub mod query;

use std::sync::Arc;
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion rust/crates/web/src/main.rs
Expand Up @@ -2,7 +2,6 @@ mod app;
mod handler;
mod infra;
mod model;
mod mutation;
#[cfg(test)]
mod test_utils;
mod use_case;
Expand Down
8 changes: 6 additions & 2 deletions rust/crates/web/src/use_case.rs
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use async_graphql::{EmptySubscription, Schema};
use axum::async_trait;

use crate::{model, mutation};
use crate::model;

#[derive(Clone, Debug, thiserror::Error)]
pub enum Error {
Expand All @@ -26,7 +26,11 @@ pub trait HasSchema {
// TODO: query, mutation, subscription
fn schema(
&self,
) -> &Schema<crate::handler::graphql::query::QueryRoot, mutation::MutationRoot, EmptySubscription>;
) -> &Schema<
crate::handler::graphql::query::QueryRoot,
crate::handler::graphql::mutation::MutationRoot,
EmptySubscription,
>;
}

pub trait HasStore {
Expand Down

0 comments on commit d1fa7a7

Please sign in to comment.