Skip to main content
Use the latest-comment pattern when you need a compact preview, such as showing the newest comment below a post card. iOS and Android expose dedicated latest-comment helpers. TypeScript and Flutter use the normal comment query API sorted newest-first with a page size of one.

Platform Availability

Parameters

Dedicated Helpers

Use the dedicated iOS and Android helpers when you want the latest comment without building a manual one-item query.

Query the Latest Comment

Use this pattern on TypeScript and Flutter, or when you want the same query-based behavior across platforms.

Include Replies

For iOS and Android dedicated helpers, includeReplies controls whether replies can be returned as the latest comment. For query-based implementations, use the parentId filter:
  • Omit parentId to query comments from all levels where the SDK supports it.
  • Set parentId to null / nil to query only top-level comments.
  • Set parentId to a comment ID to query replies to that comment.

Notes

  • The dedicated iOS and Android latest-comment helpers return one comment, not a live object or live collection.
  • Use Query Comments when you need pagination, filtering, or a full thread.
  • Handle the empty state in query-based implementations because a reference may not have comments yet.

Query Comments

Query comments with parent filters, deleted-state filters, and pagination.

Get Comment

Retrieve a specific comment by ID.