Follow
A follow edge points from one feed to another, e.g. timeline:maya follows user:diego.
There is no backfill: a follow only affects activities posted after the edge exists
(copy_limit=0, spec §1) — following someone doesn’t retroactively pull their history
into your timeline. Follower/following counts are denormalized (spec §4) and read without
a COUNT(*).
Follow
Section titled “Follow”DropInServer has no follow() method — following happens as the acting user, over
the client SDK. The showcase’s seed script needs a follow edge from server code and,
lacking an SDK method for it, mints a short-lived server token and calls the follow
route directly (apps/showcase/lib/seed.ts); that’s a workaround, not a documented
server API, so no server tab is shown here.
// client.feed(sourceGroup, sourceId).follow(targetGroup, targetId)await client.feed('timeline', 'maya').follow('user', 'diego')import { useFollow } from '@dropin/react'
function FollowButton({ targetId }: { targetId: string }) { const { follow, unfollow, isFollowing } = useFollow('timeline', 'maya') const following = isFollowing('user', targetId) return ( <button onClick={() => (following ? unfollow('user', targetId) : follow('user', targetId))}> {following ? 'Following' : 'Follow'} </button> )}follow/unfollow update isFollowing() optimistically and roll back on error.
Unfollow
Section titled “Unfollow”await client.feed('timeline', 'maya').unfollow('user', 'diego')const { unfollow } = useFollow('timeline', 'maya')await unfollow('user', 'diego')Read follower/following counts
Section titled “Read follower/following counts”const stats = await client.feed('user', 'diego').followStats()stats.follower_countstats.following_countimport { useFollowStats } from '@dropin/react'
const { followerCount, followingCount, isLoading } = useFollowStats('user', 'diego')const stats = await server.feed('user', 'diego').followStats()To read the actual list of followers or followed feeds (not just the counts), use
client.feed(group, id).followers(q) / .following(q) — both return a
Page<Follow> — or the useFollowers(group, id) / useFollowing(group, id) hooks.