Overview
useFetchCommentByForeignId returns a function that fetches a comment using the foreign ID from your own system. Useful when you’ve stored your own identifier on a comment and need to retrieve it later.
With the
moderation bundle installed, the comment comes back the way a thread shows it: in full with isAuthorBlocked: true when the signed-in user blocked its author, or as a placeholder with isUnavailable: true when the author blocked them. An embedded parentComment follows the same rules.When the entity’s author has blocked the signed-in user, the request fails with 404 comment/not-found, identical to a comment that doesn’t exist — except for the user’s own comments, which still load (with entity and parentComment set to null when requested) so they can be found and deleted. Replying to, reacting to and editing those are refused. entity: null only means the entity isn’t available to the signed-in user (for example, removed by a moderator) — the comment is still returned, and null doesn’t say why.Usage Example
Parameters
string
required
The foreign ID to look up.
string | string[]
Populate related data. Accepted values:
"user", "entity", "space", "parent", "grants".Returns
Comment
The fetched comment. See Comment data model.

