I saw many tutorials/article they have mentioned that following/followers field as an integer in user model in GraphQL schema. I know those are for demo purpose. But I don't know how to save the followers/following users with proper relational model and how unfollow works. I saw Twitter developer site here they mentioned their user model as follows:
{
"id": 6253282,
"id_str": "6253282",
"name": "Twitter API",
"screen_name": "TwitterAPI",
"location": "San Francisco, CA",
"profile_location": null,
"followers_count": 6133636,
"friends_count": 12,
"listed_count": 12936,
"created_at": "Wed May 23 06:01:13 +0000 2007",
"favourites_count": 31,
}
I don't know whether this is their original code or prototype. But I'm confused how they are saving the follower userID.
1. How can we create proper follower/following model in graphQL?
2. Also how to create post likes/dislikes in GraphQL?