progress-pile/progress-pile-server/src/graphql/mod.rs

20 lines
484 B
Rust
Raw Normal View History

2025-05-08 06:33:08 +09:00
mod mutation;
mod query;
2025-05-09 06:39:01 +09:00
pub use progress_pile_core::graphql::*;
2025-05-08 06:33:08 +09:00
pub use mutation::Mutation;
pub use query::Query;
2025-05-06 14:44:57 +09:00
use async_graphql::{EmptySubscription, Schema};
use async_graphql_axum::GraphQL;
use axum::{routing::get, Router};
2025-05-08 06:33:08 +09:00
2025-05-06 14:44:57 +09:00
pub fn build_schema() -> Schema<Query, Mutation, EmptySubscription>{
Schema::build(Query, Mutation, EmptySubscription).finish()
}
pub fn build_service() -> GraphQL<Schema<Query, Mutation, EmptySubscription>> {
GraphQL::new(build_schema())
}