You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Initial GraphQL API
This commit is contained in:
@@ -22,7 +22,7 @@ use mas_router::UrlBuilder;
|
||||
use mas_templates::Templates;
|
||||
use sqlx::PgPool;
|
||||
|
||||
use crate::MatrixHomeserver;
|
||||
use crate::{GraphQLSchema, MatrixHomeserver};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AppState {
|
||||
@@ -34,6 +34,7 @@ pub struct AppState {
|
||||
pub mailer: Mailer,
|
||||
pub homeserver: MatrixHomeserver,
|
||||
pub policy_factory: Arc<PolicyFactory>,
|
||||
pub graphql_schema: GraphQLSchema,
|
||||
}
|
||||
|
||||
impl FromRef<AppState> for PgPool {
|
||||
@@ -42,6 +43,12 @@ impl FromRef<AppState> for PgPool {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRef<AppState> for GraphQLSchema {
|
||||
fn from_ref(input: &AppState) -> Self {
|
||||
input.graphql_schema.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRef<AppState> for Templates {
|
||||
fn from_ref(input: &AppState) -> Self {
|
||||
input.templates.clone()
|
||||
|
||||
Reference in New Issue
Block a user