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

@@ -22,7 +22,7 @@ use mas_router::UrlBuilder;
use mas_templates::Templates;
use sqlx::PgPool;
use crate::{GraphQLSchema, MatrixHomeserver};
use crate::MatrixHomeserver;
#[derive(Clone)]
pub struct AppState {
@@ -34,7 +34,7 @@ pub struct AppState {
pub mailer: Mailer,
pub homeserver: MatrixHomeserver,
pub policy_factory: Arc<PolicyFactory>,
pub graphql_schema: GraphQLSchema,
pub graphql_schema: mas_graphql::Schema,
}
impl FromRef<AppState> for PgPool {
@@ -43,7 +43,7 @@ impl FromRef<AppState> for PgPool {
}
}
impl FromRef<AppState> for GraphQLSchema {
impl FromRef<AppState> for mas_graphql::Schema {
fn from_ref(input: &AppState) -> Self {
input.graphql_schema.clone()
}