Guides

🚧

This Request is Protected by Authentication

hint: this means it requires an x-access-token header put in the request with your authentication token.

Fetch a curated feed of posts, quotes, collects and comments from the profiles that a specified profile follows.

This also is fully open so if you wish to see someone else's feed just supply their profile id in.

Request

FeedRequest

Invocation

const feedResult = await client.feed.fetch({
  where: {
    for: "PROFILE_ID",
  },
});
fragment ReactionEvent on ReactionEvent {
  by {
    ...ProfileFields
  }
  reaction
  createdAt
}

fragment FeedItem on FeedItem {
  id
  root {
    ... on Post {
      ...Post
    }
    ... on Comment {
      ...Comment
    }
    ... on Quote {
      ...Quote
    }
  }
  mirrors {
    ...Mirror
  }
  reactions {
    ...ReactionEvent
  }
  comments {
    ...Comment
  }
}

query Feed($request: FeedRequest!) {
  result: feed(request: $request) {
    items {
      ...FeedItem
    }
    pageInfo {
      ...PaginatedResultInfo
    }
  }
}

Response

FeedItem

The response is aggregated to enable high-quality feeds to be constructed.

Root

This contains the feed item root which is a Post, Comment or Quote, this is the main context around your feed item.

Comments

This contains the comments which have been published to the root publication. The first item in the array is the most recent comment.

Mirrors

This contains the mirrors which have been published to the root publication. The first item in the array is the most recent mirror.

Reactions

This contains the reactions which have been published to the root publication. The first item in the array is the most recent reaction.

Acted

This contains the actions which have been performed on the root publication. The first item in the array is the most recent action.

Examples of Feed Items

Post

A post published by any of a profile's following can appear in their feed.

Comment

A comment published by any of a profile's following can appear in their feed.

Mirror

A mirror published by any of a profile's following can appear in their feed.

Quote

A quote published by any of a profile's following can appear in their feed.

Open Action

An open action performed by any of a profile's following can appear in their feed.


Full GraphQL API Example

📘

Feed: GraphQL API Full Example