Skip to main content

Example: Social Graph

Build a social activity feed from followed accounts.

Query​

Query

query GetFollowingFeed($address: String!, $limit: Int!) {
  following_count: following_aggregate(args: { address: $address }) {
    aggregate {
      count
    }
  }
  positions_from_following(
    args: { address: $address }
    limit: $limit
    order_by: { created_at: desc }
  ) {
    id
    shares
    created_at
    account {
      id
      label
      image
    }
    vault {
      term_id
      term {
        atom { label image }
      }
    }
  }
}

Variables

Click "Run Query" to execute the GraphQL query and see results