Follow Relationships

This guide explains how to fetch followers and followings on Lens.


List Followers

Use the paginated followers query to list followers of an Account.

query {  followers(    request: {      account: "0x5E647e6197fa5C6aA814E11C3504BE232a3D671a"
      # optional, defaults to Global Graph      # forGraphs: [EvmAddress!]
      # optional, defaults to ACCOUNT_SCORE      # orderBy: FollowersOrderBy    }  ) {    items {      ...Account    }    pageInfo {      prev      next    }  }}

See the Pagination guide for more information on how to handle paginated results.

List Following

Use the paginated following query to list followings of an Account.

query {  following(    request: {      account: "0x5E647e6197fa5C6aA814E11C3504BE232a3D671a"
      # optional, defaults to Global Graph      # forGraphs: [EvmAddress!]
      # optional, defaults to ACCOUNT_SCORE      # orderBy: FollowersOrderBy    }  ) {    items {      ...Account    }    pageInfo {      prev      next    }  }}

See the Pagination guide for more information on how to handle paginated results.

List Followers You Know

You can also cross-reference the followers of an Account that are also the followings of another Account.

This could be a powerful hint to suggest potential connections between two Accounts.

Use the paginated followersYouKnow query to list the followings of a target Account that are followed by an observer Account.

query {  following(    followersYouKnow: {      target: "0x5E647e6197fa5C6aA814E11C3504BE232a3D671a"      observer: "0x1234567890abcdef1234567890abcdef12345678"
      # optional, defaults to Global Graph      # forGraphs: [EvmAddress!]
      # optional, defaults to ACCOUNT_SCORE      # orderBy: FollowersYouKnowOrderBy    }  ) {    items {      ...Account    }    pageInfo {      prev      next    }  }}

See the Pagination guide for more information on how to handle paginated results.

Inspect Follow Status

Given 2 or more Accounts, you might need to know what is their relative following relationship.

Use the followStatus query to verify the follow status of a list of target-observer pairs.

Pro-tip: Include the same pair twice, reversing the target and observer, to determine if they follow each other in a single request.

query {  followStatus(    request: [      {        follower: "0xb0b…"        account: "0xa1ece…"
        # optional, defaults to Global Graph        # graph: EvmAddress      }      {        follower: "0xa1ece…"        account: "0xb0b…"
        # optional, defaults to Global Graph        # graph: EvmAddress      }    ]  ) {    graph    follower    account    isFollowing {      ...BooleanValue    }  }}