Skip to main content

Follow state

Accounts that approve followers

A user can choose who may follow them: everyone (the default), or only accounts they approve. On an approval account, useFollow sends a request instead of following — the result is { isFollowing: false, isRequested: true }, and the caller is not a follower (and does not see the owner’s followers-only content) until the owner accepts. Read followPolicy from useFollowStatus or useFollowStats to label the button before it is pressed. Accepting or declining requests, and changing the setting, happen in the cskn apps themselves — those calls are not open to mini apps. Both mutations invalidate the follow-state and list queries for you.

Lists

Omit the username for the signed-in user’s own lists. Each FollowUser is { _id, username, name, picture? }.

Plain functions

getFollowStatus, getFollowStats, getIsFollowing, getFollowers, getFollowing, getFollowRequests, followUser and unfollowUser are exported for use outside React.