mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
update client to use proper follow/unfollow mutation
This commit is contained in:
parent
7cca60358c
commit
37a0ab6902
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user