Sanity App SDK
    Preparing search index...

    Interface CommentThreadBeta

    A thread: one comment plus its replies.

    Unlike the Studio, the SDK returns every thread it finds. The Studio hides threads whose field is gone from the schema or hidden by a conditional, which it can do because it has the schema. Check fieldPath yourself if your app needs the same behaviour.

    interface CommentThread {
        commentsCount: number;
        fieldPath: string;
        lastActivityAt: string;
        parentComment: Comment;
        replies: Comment[];
        status: CommentStatus;
        threadId: string;
    }
    Index

    Properties

    commentsCount: number

    The parent plus its replies.

    fieldPath: string

    The field the thread hangs off, taken from its first comment.

    lastActivityAt: string

    createdAt of the most recent comment in the thread.

    parentComment: Comment
    replies: Comment[]

    Oldest first.

    Taken from the parent comment; replies follow it.

    threadId: string