1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Move the GraphQL schema to its own crate

This commit is contained in:
Quentin Gliech
2022-11-04 19:22:33 +01:00
parent c13b0478e6
commit 13c7d2772f
9 changed files with 180 additions and 56 deletions

View File

@@ -56,10 +56,7 @@ mod views;
pub use compat::MatrixHomeserver;
pub use self::{
app_state::AppState,
graphql::{schema as graphql_schema, Schema as GraphQLSchema},
};
pub use self::{app_state::AppState, graphql::schema as graphql_schema};
#[must_use]
pub fn empty_router<S, B>(state: Arc<S>) -> Router<S, B>
@@ -87,7 +84,7 @@ where
<B as HttpBody>::Data: Into<Bytes>,
<B as HttpBody>::Error: std::error::Error + Send + Sync,
S: Send + Sync + 'static,
GraphQLSchema: FromRef<S>,
mas_graphql::Schema: FromRef<S>,
Encrypter: FromRef<S>,
{
let mut router = Router::with_state_arc(state)
@@ -344,7 +341,7 @@ where
Templates: FromRef<S>,
Mailer: FromRef<S>,
MatrixHomeserver: FromRef<S>,
GraphQLSchema: FromRef<S>,
mas_graphql::Schema: FromRef<S>,
{
let healthcheck_router = healthcheck_router(state.clone());
let discovery_router = discovery_router(state.clone());