From 15e9c596c228ff76797a49edc51b97e2cf451311 Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Sun, 17 Oct 2021 17:09:06 +0000 Subject: [PATCH] Change all field names to camelCase in GraphQL --- src/graphql.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphql.rs b/src/graphql.rs index 0fb2516..1bab72b 100644 --- a/src/graphql.rs +++ b/src/graphql.rs @@ -373,7 +373,7 @@ impl Query { #[graphql_object(context = Context)] impl Query { - async fn get_user_id(context: &Context, username: String) -> FieldResult { + async fn getUserID(context: &Context, username: String) -> FieldResult { sqlx::query(format!( r#"SELECT id FROM users WHERE user_name="{}""#, username @@ -387,7 +387,7 @@ impl Query { Self::users_sqlx_result(context).await.map_err(FieldError::from) } - async fn user_preferences(context: &Context, id: ID) -> FieldResult { + async fn userPreferences(context: &Context, id: ID) -> FieldResult { UserPreferences::try_get(&id, &context.db).await.map_err(FieldError::from) } }