From 37a0ab6902a4159e8244f17f09e4797ad038df7d Mon Sep 17 00:00:00 2001 From: Vasily Belolapotkov Date: Fri, 20 Sep 2019 16:57:55 +0300 Subject: [PATCH] update client to use proper follow/unfollow mutation --- webapp/components/FollowButton.vue | 2 +- webapp/graphql/User.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/components/FollowButton.vue b/webapp/components/FollowButton.vue index 5275035e5..e1cad8c8e 100644 --- a/webapp/components/FollowButton.vue +++ b/webapp/components/FollowButton.vue @@ -73,7 +73,7 @@ export default { variables: { id: this.followId }, }) - const followedUser = follow ? data.follow : data.unfollow + const followedUser = follow ? data.followUser : data.unfollowUser this.$emit('update', followedUser) } catch { optimisticResult.followedByCurrentUser = !follow diff --git a/webapp/graphql/User.js b/webapp/graphql/User.js index 11149f398..27b3785ae 100644 --- a/webapp/graphql/User.js +++ b/webapp/graphql/User.js @@ -106,7 +106,7 @@ export const followUserMutation = i18n => { return gql` ${userFragment(lang)} mutation($id: ID!) { - follow(id: $id, type: User) { + followUser(id: $id) { name followedByCount followedByCurrentUser @@ -123,7 +123,7 @@ export const unfollowUserMutation = i18n => { return gql` ${userFragment(lang)} mutation($id: ID!) { - unfollow(id: $id, type: User) { + unfollowUser(id: $id) { name followedByCount followedByCurrentUser