Refetch posts list if you block a user

Because you won't see any posts of a blocked user
This commit is contained in:
roschaefer 2019-08-13 16:05:57 +02:00
parent 5103bdbc2a
commit 717147bd0c

View File

@ -382,10 +382,13 @@ export default {
}, },
async block(user) { async block(user) {
await this.$apollo.mutate({ mutation: Block(), variables: { id: user.id } }) await this.$apollo.mutate({ mutation: Block(), variables: { id: user.id } })
await this.fetchUser() this.$apollo.queries.User.refetch()
this.$apollo.queries.Post.refetch()
}, },
async unblock(user) { async unblock(user) {
await this.$apollo.mutate({ mutation: Unblock(), variables: { id: user.id } }) await this.$apollo.mutate({ mutation: Unblock(), variables: { id: user.id } })
this.$apollo.queries.User.refetch()
this.$apollo.queries.Post.refetch()
}, },
}, },
apollo: { apollo: {