refactor: split modules
This commit is contained in:
@@ -2,7 +2,7 @@ use async_graphql::dynamic::Schema;
|
||||
use sea_orm::DatabaseConnection;
|
||||
|
||||
use super::{config::GraphQLConfig, schema_root};
|
||||
use crate::errors::app_error::RResult;
|
||||
use crate::errors::RecorderResult;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GraphQLService {
|
||||
@@ -13,7 +13,7 @@ impl GraphQLService {
|
||||
pub async fn from_config_and_database(
|
||||
config: GraphQLConfig,
|
||||
db: DatabaseConnection,
|
||||
) -> RResult<Self> {
|
||||
) -> RecorderResult<Self> {
|
||||
let schema = schema_root::schema(
|
||||
db,
|
||||
config.depth_limit.and_then(|l| l.into()),
|
||||
|
||||
Reference in New Issue
Block a user