Skip to main content
The follows module acts on your own follow graph — the graph of the logged-in token holder. Use it to list the users you follow, list your followers, count either, and delete one of your follow relationships by its record ID.
To read another user’s followers, or to follow or unfollow someone by their user ID, use the users module.

fetchFollowing

Returns a paginated list of users you follow.
number
Page number (1-indexed). Defaults to 1.
number
Results per page: a whole number from 1 to 100. Defaults to 20. A larger value is rejected with 400 follow/invalid-query, never lowered to 100.
string
Optional search term. Filters the list to users whose username or name contains this text (case-insensitive). When omitted, no filtering is applied.
string
Restricts which field query matches against — username or name. When omitted, query matches either field.
Returns — Promise<PaginatedResponse<FollowRow>>, where each FollowRow is { id, user, createdAt }: id is the follow record’s ID (what deleteFollow takes) and user is the followed user.

fetchFollowers

Returns a paginated list of your followers.
number
Page number (1-indexed). Defaults to 1.
number
Results per page: a whole number from 1 to 100. Defaults to 20. A larger value is rejected with 400 follow/invalid-query, never lowered to 100.
string
Optional search term. Filters the list to users whose username or name contains this text (case-insensitive). When omitted, no filtering is applied.
string
Restricts which field query matches against — username or name. When omitted, query matches either field.
Returns — Promise<PaginatedResponse<FollowRow>>, where each FollowRow is { id, user, createdAt } and user is the follower.

fetchFollowingCount

Returns the number of users you follow.
Returns — Promise<{ count: number }>

fetchFollowersCount

Returns the number of your followers.
Returns — Promise<{ count: number }>

deleteFollow

Deletes one of your follow relationships by its follow ID.
string
required
The ID of the follow relationship to delete: a FollowRow’s id, e.g. from fetchFollowing. Only the follower can delete a follow.
Returns — Promise<void>