From 2c0c99ce01a69c8a5ec14eab737d7858cf11dcb1 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 7 Sep 2024 12:13:12 +0200 Subject: Use submodules mutations and query for types --- src/graphql/query.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/graphql/query.rs') diff --git a/src/graphql/query.rs b/src/graphql/query.rs index 58685ed..e52bd2a 100644 --- a/src/graphql/query.rs +++ b/src/graphql/query.rs @@ -26,7 +26,7 @@ impl Query { #[graphql(desc = "Limit results")] limit: Option, #[graphql(desc = "Offset results")] offset: Option, ) -> Result>, String> { - user::get_users(ctx, limit, offset).await + user::query::get_users(ctx, limit, offset).await } /// Returns an user by ID. Admins can check everyone. @@ -43,7 +43,7 @@ impl Query { ctx: &Context<'ctx>, #[graphql(desc = "User to find")] id: i32, ) -> Result { - user::get_user_by_id(ctx, id).await + user::query::get_user_by_id(ctx, id).await } /// Returns all the positions @@ -62,7 +62,7 @@ impl Query { #[graphql(desc = "Limit results")] limit: Option, #[graphql(desc = "Offset results")] offset: Option, ) -> Result>, String> { - position::get_positions(ctx, user_id, limit, offset).await + position::query::get_positions(ctx, user_id, limit, offset).await } /// Returns all the last positions for each user. @@ -82,7 +82,7 @@ impl Query { position::MovingActivity, >, ) -> Result>, String> { - position::last_positions(ctx, moving_activity).await + position::query::last_positions(ctx, moving_activity).await } /// Returns all the positions @@ -101,7 +101,7 @@ impl Query { #[graphql(desc = "Limit results")] limit: Option, #[graphql(desc = "Offset results")] offset: Option, ) -> Result>, String> { - alert::get_alerts(ctx, id, limit, offset).await + alert::query::get_alerts(ctx, id, limit, offset).await } /// Returns all the notifications. They can be filtered by an alert id. @@ -123,6 +123,6 @@ impl Query { #[graphql(desc = "Limit results")] limit: Option, #[graphql(desc = "Offset results")] offset: Option, ) -> Result>, String> { - notification::get_notifications(ctx, seen, alert_id, limit, offset).await + notification::query::get_notifications(ctx, seen, alert_id, limit, offset).await } } -- cgit v1.2.3-18-g5258