From 40ba65dca76a60dd54dc3173fcfc3df62b92ac1d Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Mon, 30 Aug 2021 09:49:13 +0200 Subject: [PATCH] app: make a graphql argument required --- app/queries/get_user_details.graphql | 2 +- app/src/user_details.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/queries/get_user_details.graphql b/app/queries/get_user_details.graphql index 2d31dfd..8892e1b 100644 --- a/app/queries/get_user_details.graphql +++ b/app/queries/get_user_details.graphql @@ -1,4 +1,4 @@ -query GetUserDetails($id: String) { +query GetUserDetails($id: String!) { user(id: $id) { id email diff --git a/app/src/user_details.rs b/app/src/user_details.rs index 7542e17..37303ae 100644 --- a/app/src/user_details.rs +++ b/app/src/user_details.rs @@ -36,7 +36,7 @@ impl UserDetails { fn get_user_details(&mut self) { self._task = HostService::graphql_query::( get_user_details::Variables { - id: Some(self.username.clone()), + id: self.username.clone(), }, self.link.callback(Msg::UserDetailsResponse), "Error trying to fetch user details",