update client to use proper follow/unfollow mutation

This commit is contained in:
Vasily Belolapotkov 2019-09-20 16:57:55 +03:00
parent 7cca60358c
commit 37a0ab6902
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ export default {
variables: { id: this.followId }, variables: { id: this.followId },
}) })
const followedUser = follow ? data.follow : data.unfollow const followedUser = follow ? data.followUser : data.unfollowUser
this.$emit('update', followedUser) this.$emit('update', followedUser)
} catch { } catch {
optimisticResult.followedByCurrentUser = !follow optimisticResult.followedByCurrentUser = !follow

View File

@ -106,7 +106,7 @@ export const followUserMutation = i18n => {
return gql` return gql`
${userFragment(lang)} ${userFragment(lang)}
mutation($id: ID!) { mutation($id: ID!) {
follow(id: $id, type: User) { followUser(id: $id) {
name name
followedByCount followedByCount
followedByCurrentUser followedByCurrentUser
@ -123,7 +123,7 @@ export const unfollowUserMutation = i18n => {
return gql` return gql`
${userFragment(lang)} ${userFragment(lang)}
mutation($id: ID!) { mutation($id: ID!) {
unfollow(id: $id, type: User) { unfollowUser(id: $id) {
name name
followedByCount followedByCount
followedByCurrentUser followedByCurrentUser