馃殌 [Feature] Update follow/unfollow mutation to return user
Created by: Tirokk
Authored by vbelolapotkov Closed
馃殌 Feature
The feature relates to #293 (closed) . To make it right a server should return an updated user object with proper followedByCount
Additional context
Use case:
- User A clicks 'Follow/unfollow' button in popup of the other user (User B)
- Follow button state should change (as it is now) and followers count for User B should be updated.
Current solution drawbacks:
-
If the button is used on a user B page, then followedByCount number has glitches.
-
The current solution only makes an increase/decrease of the followedByCount by 1 which is fine for the optimistic update but might be incorrect (other users can follow/unfollow the user at the same time => this info will not appear until next page reload).