Skip to main content

Comments & Forum Endpoints

Fetch discussion threads and comments for videos and content pages.

QueryComments1 pt

Fetch comments for a commentable object

Returns a paginated list of comments associated with a specific commentable object such as a thread, discussion board post, or assignment submission. You must supply both `commentableType` (e.g. `thread`, `assignmentSubmission`) and `commentableId`. Use `parentId` to retrieve replies nested beneath a specific parent comment. Filter by `userId` to retrieve only comments authored by a particular user. Each comment includes the author's user profile, any attached media, child comment counts, and like metadata. Providing an `authToken` header contextualizes per-user fields such as `userLikeId`.

Arguments

NameTypeDescription
clientIdIDThe ID of the client.
parentIdIDThe ID of the parent.
commentableTypeCommentableType!The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc.
commentableIdID!The ID of the commentable type.
pageIntThe page number to return within the collection.
userIdIDThe ID of the user.

Returns

FieldTypeDescription
pageInfoPageInfo!Pagination metadata including current page, items per page, total count, and whether additional pages exist.
comments[Comment!]The list of comment objects for the requested page, each including body text, author, media attachments, nested replies, and like data.

Example

query GetComments {
  Comments(
    commentableType: thread
    commentableId: "thread_001"
    page: 1
  ) {
    pageInfo {
      perPage
      currentPage
      total
      hasMore
    }
    comments {
      id
      body
      createdAt
      updatedAt
      notificationsEnabled
      likesCount
      userLikeId
      commentableId
      commentableType
      user {
        id
        name
        email
      }
      childComments {
        pageInfo {
          total
        }
      }
    }
  }
}

Example Response

{
  "data": {
    "Comments": {
      "pageInfo": {
        "perPage": 25,
        "currentPage": 1,
        "total": 8,
        "hasMore": false
      },
      "comments": [
        {
          "id": "comment_001",
          "body": "Great introduction! Really looking forward to this course.",
          "createdAt": "2024-03-02T09:15:00Z",
          "updatedAt": "2024-03-02T09:15:00Z",
          "notificationsEnabled": true,
          "likesCount": 5,
          "userLikeId": null,
          "commentableId": "thread_001",
          "commentableType": "thread",
          "user": {
            "id": "user_222",
            "name": "John Learner",
            "email": "[email protected]"
          },
          "childComments": {
            "pageInfo": {
              "total": 2
            }
          }
        }
      ]
    }
  },
  "pageInfo": null,
  "comments": null
}

Results may vary depending on the authenticated user context supplied via the `authToken` header. Nested child comments are available on each comment via the `childComments` field.

QueryForums1 pt

Fetch forums for a course

Retrieves all forums associated with a given course, including discussion threads scoped to the course, a specific widget, or an assignment. Each forum object includes metadata such as a label, thread count, section association, and whether it is the general forum. Because this query is user-aware, passing an `authToken` header will scope the results to the authenticated user's perspective — for example, to determine access or visibility. Use this query to build discussion UIs or to enumerate available forums before fetching individual threads.

Arguments

NameTypeDescription
courseIdID!The ID of the course.
clientIdIDThe ID of the client.

Returns

FieldTypeDescription
idIDUnique identifier of the forum.
courseCourse!The course this forum belongs to, including full course details.
sectionIdIDThe ID of the course section this forum is associated with, if scoped to a section.
labelStringDisplay label for the forum.
threadsCountInt!The total number of discussion threads in this forum.
createdAtDateTimestamp when the forum was created.
updatedAtDateTimestamp when the forum was last updated.
isGeneralBoolean!Whether this is the general (top-level) forum for the course.

Example

query GetCourseForums($courseId: ID!) {
  Forums(courseId: $courseId) {
    id
    label
    sectionId
    threadsCount
    isGeneral
    createdAt
    updatedAt
    course {
      id
      title
      slug
      status
    }
  }
}

Example Response

{
  "data": {
    "Forums": [
      {
        "id": "forum_abc123",
        "label": "General Discussion",
        "sectionId": null,
        "threadsCount": 14,
        "isGeneral": true,
        "createdAt": "2024-01-15T10:00:00Z",
        "updatedAt": "2024-06-01T08:30:00Z",
        "course": {
          "id": "course_xyz789",
          "title": "Introduction to Data Science",
          "slug": "intro-to-data-science",
          "status": "published"
        }
      },
      {
        "id": "forum_def456",
        "label": "Week 2 Assignment Help",
        "sectionId": "section_001",
        "threadsCount": 5,
        "isGeneral": false,
        "createdAt": "2024-02-01T09:00:00Z",
        "updatedAt": "2024-05-20T14:00:00Z",
        "course": {
          "id": "course_xyz789",
          "title": "Introduction to Data Science",
          "slug": "intro-to-data-science",
          "status": "published"
        }
      }
    ]
  },
  "id": "abc-123",
  "course": null,
  "sectionId": "abc-123",
  "label": "example",
  "threadsCount": 0,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "isGeneral": false
}

The results of this query are user-context-sensitive. Provide an `authToken` header to set the active user and adjust visibility accordingly.

QuerySearchThreads1 pt

Search threads within a widget forum

Performs a full-text search across threads scoped to a specific widget forum. This query is exclusively for widget-type forums — it will not search course discussion board forums. Supply a `query` string to filter threads by matching text. Results are always paginated; both `page` and `perPage` are required. The `sort` argument controls result ordering. Optionally filter by `clientId` to restrict results to a particular client. Providing an `authToken` header contextualizes per-user fields such as notification state and bookmarks. The `matchCount` field on each thread indicates how many times the query matched within that thread.

Arguments

NameTypeDescription
widgetForumIdID!The ID of the Widget Forum.
clientIdIDThe ID of the client.
queryStringThe search query used to return the list of threads.
pageInt!The page number to return within the collection.
perPageInt!The amount of items to be returned on the page.
sortString!How the items are to be sorted.

Returns

FieldTypeDescription
discussionRulesStringOptional plain-text rules or guidelines for the widget forum discussion.
pageInfoPageInfo!Pagination metadata including current page, items per page, total result count, and whether more pages exist.
threads[Thread!]The list of matching thread objects for the requested page, each including authoring details and a `matchCount` reflecting search relevance.

Example

query SearchWidgetThreads {
  SearchThreads(
    widgetForumId: "widget_forum_456"
    query: "getting started"
    page: 1
    perPage: 10
    sort: "recent"
  ) {
    pageInfo {
      perPage
      currentPage
      total
      hasMore
    }
    threads {
      id
      title
      body
      commentsCount
      matchCount
      createdAt
      notificationsEnabled
      user {
        id
        name
      }
    }
  }
}

Example Response

{
  "data": {
    "SearchThreads": {
      "discussionRules": null,
      "pageInfo": {
        "perPage": 10,
        "currentPage": 1,
        "total": 3,
        "hasMore": false
      },
      "threads": [
        {
          "id": "thread_201",
          "title": "Getting started tips",
          "body": "Here are some tips for getting started with the platform...",
          "commentsCount": 7,
          "matchCount": 2,
          "createdAt": "2024-02-20T14:00:00Z",
          "notificationsEnabled": false,
          "user": {
            "id": "user_333",
            "name": "Alice Admin"
          }
        }
      ]
    }
  },
  "discussionRules": "example",
  "pageInfo": null,
  "threads": null
}

This query only works for widget forum threads. It will not return results for course discussion board forums. The `matchCount` field on each thread indicates how many search matches were found within that thread.

QueryThreadById1 pt

Fetch a single thread by ID

Retrieves a single discussion thread by its unique ID. Optionally scope the lookup to a specific client or forum by providing `clientId` or `forumId`. Use `commentableType` to disambiguate threads that exist across different forum contexts (e.g. widget threads vs. discussion board threads). Providing an `authToken` header will enrich the response with per-user context such as notification and bookmark state for the authenticated user.

Arguments

NameTypeDescription
idID!The ID of the thread.
clientIdIDThe ID of the client.
forumIdIDThe ID of the Forum.
commentableTypeCommentableTypeThe type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc.

Returns

FieldTypeDescription
idID!The unique identifier of the thread.
titleStringThe title or subject of the thread.
bodyStringThe main body text of the thread post.
commentsCountInt!The total number of comments posted on this thread.
userUser!The user who created the thread.
forumForum!The forum in which this thread resides.
forumIdID!The ID of the forum this thread belongs to.
courseCourseThe course associated with this thread, if applicable.
clientClientThe client (tenant) this thread belongs to, if applicable.
createdAtDateThe timestamp when the thread was created.
updatedAtDateThe timestamp when the thread was last updated.
assetURLURL of an image or file asset attached to the thread.
assetFileNameStringThe filename of the attached asset.
videoAssetIDThe ID of a video asset attached to the thread.
notificationsEnabledBoolean!Whether the current user has notifications enabled for this thread.
matchCountIntThe number of search matches within this thread, populated when returned from a search query.
bookmarkIDThe bookmark ID if the current authenticated user has bookmarked this thread.

Example

query GetThreadById {
  ThreadById(
    id: "thread_001"
    forumId: "forum_abc123"
  ) {
    id
    title
    body
    commentsCount
    createdAt
    updatedAt
    notificationsEnabled
    bookmark
    forumId
    user {
      id
      name
      email
    }
    forum {
      id
      label
      threadsCount
      isGeneral
    }
    course {
      id
      title
      slug
    }
  }
}

Example Response

{
  "data": {
    "ThreadById": {
      "id": "thread_001",
      "title": "Welcome to the course discussion!",
      "body": "Feel free to introduce yourself here.",
      "commentsCount": 12,
      "createdAt": "2024-03-01T10:00:00Z",
      "updatedAt": "2024-03-15T08:30:00Z",
      "notificationsEnabled": true,
      "bookmark": null,
      "forumId": "forum_abc123",
      "user": {
        "id": "user_111",
        "name": "Jane Instructor",
        "email": "[email protected]"
      },
      "forum": {
        "id": "forum_abc123",
        "label": "General Discussion",
        "threadsCount": 45,
        "isGeneral": true
      },
      "course": {
        "id": "course_xyz789",
        "title": "Introduction to GraphQL",
        "slug": "intro-to-graphql"
      }
    }
  },
  "id": "abc-123",
  "course": null,
  "forum": null,
  "forumId": "abc-123",
  "client": null,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "asset": "https://example.com",
  "assetFileName": "example",
  "videoAsset": "abc-123",
  "title": "example",
  "body": "example",
  "commentsCount": 0,
  "user": null,
  "notificationsEnabled": false,
  "matchCount": 0,
  "bookmark": "abc-123"
}

Results may vary depending on the authenticated user context supplied via the `authToken` header.

QueryThreads1 pt

Fetch paginated threads for a forum

Returns a paginated list of discussion threads belonging to a specific forum. You must always supply `forumId`; when scoping to a course-level forum you should also provide `courseId`. Optionally filter by `clientId` to restrict results to a particular client, or by `commentableType` to target a specific forum location (e.g. a discussion board, assignment, or widget thread). Pass an `authToken` header to surface per-user data such as bookmark and notification state for the authenticated user.

Arguments

NameTypeDescription
clientIdIDThe ID of the client.
courseIdIDThe ID of the course.
forumIdID!The ID of the forum.
commentableTypeCommentableTypeThe type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc.
pageIntThe page number to return within the collection.
perPageIntThe amount of items to be returned on the page.

Returns

FieldTypeDescription
discussionRulesStringOptional plain-text rules or guidelines displayed to participants of the discussion forum.
pageInfoPageInfo!Pagination metadata including the current page, items per page, total count, and whether more pages exist.
threads[Thread!]The list of thread objects returned for the requested page, each containing authoring, forum, course, and engagement details.

Example

query GetThreads {
  Threads(
    forumId: "forum_abc123"
    courseId: "course_xyz789"
    page: 1
    perPage: 20
  ) {
    discussionRules
    pageInfo {
      perPage
      currentPage
      total
      hasMore
    }
    threads {
      id
      title
      body
      commentsCount
      createdAt
      updatedAt
      notificationsEnabled
      bookmark
      forumId
      user {
        id
        name
        email
      }
      forum {
        id
        label
        threadsCount
        isGeneral
      }
    }
  }
}

Example Response

{
  "data": {
    "Threads": {
      "discussionRules": "Please be respectful and on-topic.",
      "pageInfo": {
        "perPage": 20,
        "currentPage": 1,
        "total": 45,
        "hasMore": true
      },
      "threads": [
        {
          "id": "thread_001",
          "title": "Welcome to the course discussion!",
          "body": "Feel free to introduce yourself here.",
          "commentsCount": 12,
          "createdAt": "2024-03-01T10:00:00Z",
          "updatedAt": "2024-03-15T08:30:00Z",
          "notificationsEnabled": true,
          "bookmark": null,
          "forumId": "forum_abc123",
          "user": {
            "id": "user_111",
            "name": "Jane Instructor",
            "email": "[email protected]"
          },
          "forum": {
            "id": "forum_abc123",
            "label": "General Discussion",
            "threadsCount": 45,
            "isGeneral": true
          }
        }
      ]
    }
  },
  "discussionRules": "example",
  "pageInfo": null,
  "threads": null
}

When providing `forumId`, the `courseId` argument is also required. Results may vary depending on the authenticated user context supplied via the `authToken` header.

MutationCreateComment1 pt

Create a comment

Creates a new comment on a commentable entity such as a discussion board thread, widget thread, assignment submission, or assignment. You must specify the target entity's ID and its type. Optionally, you can attach text content, a file asset, a video, or reply to an existing comment by providing a `parentId`. The `notificationsEnabled` flag controls whether the commenter receives notifications for subsequent replies. The acting user can be overridden by supplying an `authToken` header.

Arguments

NameTypeDescription
clientIdIDThe ID of the client.
commentableIdID!The ID of the commentable entity.
commentableTypeCommentableType!The type of the comment's parent thread, based on the comment's location, e.g. discussion board, assignment, widget thread, etc.
bodyStringThe body of the comment.
assetURLThe URL of the asset.
assetFileNameStringThe file name of the asset.
videoAssetIDThe ID of the video asset.
parentIdIDThe ID of the parent comment.
notificationsEnabledBoolean!Flag to enable notifications.

Returns

FieldTypeDescription
idID!Unique identifier of the newly created comment.
commentableCommentable!The entity (Topic or Thread) this comment belongs to.
commentableIdID!The ID of the entity this comment is attached to.
commentableTypeCommentableType!The type of entity being commented on (e.g., thread, assignmentSubmission, discussionBoard).
bodyStringThe text content of the comment.
userUser!The user who created the comment.
parentCommentCommentThe parent comment if this is a reply, otherwise null.
childCommentsCommentsListPaginated list of replies to this comment.
assetURLURL of a file asset attached to the comment.
assetFileNameStringThe original file name of the attached asset.
videoAssetIDThe ID of a video asset attached to the comment.
notificationsEnabledBoolean!Whether the commenter has opted in to receive notifications for replies to this comment.
userLikeIdIDThe ID of the current user's like on this comment, if they have liked it.
likesCountIntTotal number of likes this comment has received.
createdAtDateTimestamp when the comment was created.
updatedAtDateTimestamp when the comment was last updated.

Example

mutation CreateComment {
  CreateComment(
    commentableId: "thread_jkl012"
    commentableType: thread
    body: "This is a great discussion point!"
    notificationsEnabled: true
    parentId: null
    asset: null
    assetFileName: null
    videoAsset: null
    clientId: null
  ) {
    id
    body
    commentableId
    commentableType
    notificationsEnabled
    likesCount
    createdAt
    updatedAt
    user {
      id
      name
      email
    }
    parentComment {
      id
      body
    }
    asset
    assetFileName
    videoAsset
  }
}

Example Response

{
  "data": {
    "CreateComment": {
      "id": "comment_mno345",
      "body": "This is a great discussion point!",
      "commentableId": "thread_jkl012",
      "commentableType": "thread",
      "notificationsEnabled": true,
      "likesCount": 0,
      "createdAt": "2024-06-01T11:00:00Z",
      "updatedAt": "2024-06-01T11:00:00Z",
      "user": {
        "id": "user_456",
        "name": "Jane Doe",
        "email": "[email protected]"
      },
      "parentComment": null,
      "asset": null,
      "assetFileName": null,
      "videoAsset": null
    }
  },
  "id": "abc-123",
  "commentable": null,
  "commentableId": "abc-123",
  "commentableType": "thread",
  "body": "example",
  "user": null,
  "parentComment": null,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "videoAsset": "abc-123",
  "asset": "https://example.com",
  "assetFileName": "example",
  "notificationsEnabled": false,
  "childComments": null,
  "userLikeId": "abc-123",
  "likesCount": 0
}
MutationCreateCommentLike1 pt

Like a comment

Adds a like from the currently authenticated user to the specified comment. You must supply the comment ID, the ID of the entity the comment is attached to (`commentableId`), and the `commentableType` string indicating the kind of thread (e.g., `"thread"`, `"discussionBoard"`, `"assignment"`). You may optionally pass a `clientId` to scope the operation to a specific client. On success, the mutation returns the ID of the newly created like, which can later be used to remove the like via `RemoveCommentLike`.

Arguments

NameTypeDescription
commentIdID!The ID of the comment.
commentableIdID!The ID of the commentable entity.
commentableTypeString!The type of thread, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.
clientIdIDThe ID of the client.

Returns

FieldTypeDescription
ID!ID!The ID of the newly created like record.

Example

mutation CreateCommentLike {
  CreateCommentLike(
    commentId: "comment_abc123",
    commentableId: "thread_xyz789",
    commentableType: "thread",
    clientId: "client_001"
  )
}

Example Response

{
  "data": {
    "CreateCommentLike": "like_def456"
  }
}

A user may only like a given comment once. Attempting to like a comment that has already been liked by the same user will result in an error.

MutationCreateThread1 pt

Create a discussion thread

Creates a new discussion thread within the specified forum. Threads are the top-level posts that other users can reply to with comments. You must supply a `forumId` and a `title`; all other arguments are optional. Use `commentableType` to indicate where the thread lives (e.g., a discussion board, assignment, or widget). You can optionally attach an image asset or a video asset to the opening post. The `notificationsEnabled` flag controls whether the thread author receives email notifications when replies are posted. The active user is determined by the `authToken` header.

Arguments

NameTypeDescription
clientIdIDThe ID of the client.
forumIdID!The ID of the forum.
courseIdIDThe ID of the course.
layoutIdIDThe ID of the layout.
widgetTitleStringThe title of the widget.
commentableTypeCommentableTypeThe type of thread to create, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.
assetURLThe URL of the asset.
assetFileNameStringThe file name of the asset.
videoAssetIDThe ID of the video asset.
bodyStringThe body of the comment.
titleString!The title of the comment.
notificationsEnabledBoolean!Flag to enable notifications.

Returns

FieldTypeDescription
idID!The unique identifier of the newly created thread.
titleStringThe title of the thread.
bodyStringThe body text of the thread's opening post.
commentsCountInt!The total number of comments on this thread.
notificationsEnabledBoolean!Whether the thread author has email notifications enabled for new replies.
forumForum!The forum in which the thread was created.
forumIdID!The ID of the forum containing this thread.
courseCourseThe course associated with this thread, if any.
clientClientThe client context for this thread.
userUser!The user who authored the thread.
assetURLURL of an image asset attached to the thread.
assetFileNameStringFile name of the attached image asset.
videoAssetIDID of a video asset attached to the thread.
createdAtDateTimestamp when the thread was created.
updatedAtDateTimestamp when the thread was last updated.
matchCountIntSearch match count, relevant when threads are returned in a search context.
bookmarkIDID of a bookmark associated with this thread for the current user, if any.

Example

mutation CreateThread {
  CreateThread(
    forumId: "frm_abc123"
    courseId: "crs_789xyz"
    title: "What did you think of Module 1?"
    body: "Share your thoughts on the first module's content and activities."
    notificationsEnabled: true
    commentableType: course
  ) {
    id
    title
    body
    commentsCount
    notificationsEnabled
    createdAt
    forum {
      id
      label
    }
    user {
      id
      name
    }
  }
}

Example Response

{
  "data": {
    "CreateThread": {
      "id": "thr_new001",
      "title": "What did you think of Module 1?",
      "body": "Share your thoughts on the first module's content and activities.",
      "commentsCount": 0,
      "notificationsEnabled": true,
      "createdAt": "2024-03-20T14:30:00Z",
      "forum": {
        "id": "frm_abc123",
        "label": "General Discussion"
      },
      "user": {
        "id": "usr_def456",
        "name": "Jane Smith"
      }
    }
  },
  "id": "abc-123",
  "course": null,
  "forum": null,
  "forumId": "abc-123",
  "client": null,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "asset": "https://example.com",
  "assetFileName": "example",
  "videoAsset": "abc-123",
  "title": "example",
  "body": "example",
  "commentsCount": 0,
  "user": null,
  "notificationsEnabled": false,
  "matchCount": 0,
  "bookmark": "abc-123"
}

The active user for this mutation is determined by the `authToken` request header. If no auth token is provided, the mutation uses the API key's default user context.

MutationDestroyComment1 pt

Delete a comment

Permanently removes a comment from its parent thread. Pass the comment's ID and, optionally, the `commentableType` to indicate which kind of thread the comment belongs to (e.g., a discussion board, assignment, or widget thread). On success, the mutation returns the ID of the deleted comment. The acting user is set via the `authToken` header; only the comment's author or an admin may delete a comment.

Arguments

NameTypeDescription
idID!The ID of the comment.
commentableTypeCommentableTypeThe type of the comment's parent thread to destory, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.

Returns

FieldTypeDescription
IDIDThe ID of the comment that was deleted.

Example

mutation DestroyComment {
  DestroyComment(
    id: "comment_abc123",
    commentableType: thread
  )
}

Example Response

{
  "data": {
    "DestroyComment": "comment_abc123"
  }
}

This operation is irreversible. Child comments (replies) may also be removed depending on platform configuration.

MutationDestroyThread1 pt

Delete a discussion thread

Permanently removes a thread and all of its associated comments from the forum. The acting user must own the thread or have admin privileges. On success, the mutation returns the ID of the deleted thread. The `commentableType` argument can be supplied to explicitly scope the deletion to a specific thread context (e.g., discussion board vs. assignment). The acting user is resolved via the `authToken` header.

Arguments

NameTypeDescription
idID!The ID of the thread.
commentableTypeCommentableTypeThe type of thread to destroy, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.

Returns

FieldTypeDescription
DestroyThreadIDThe ID of the thread that was deleted, or null if the deletion failed.

Example

mutation DestroyThread {
  DestroyThread(
    id: "thr_new001"
    commentableType: course
  )
}

Example Response

{
  "data": {
    "DestroyThread": "thr_new001"
  }
}

This action is irreversible. All comments nested under the deleted thread will also be removed. Only the thread owner or an admin can perform this mutation.

MutationRemoveCommentLike1 pt

Unlike a comment

Removes a like previously added by the current user from a comment. You must supply both the `commentId` (the comment being unliked) and the `likeId` (the ID of the specific like record to remove, which is returned by `CreateCommentLike`). Returns `true` if the like was successfully removed. The acting user is determined by the `authToken` header.

Arguments

NameTypeDescription
commentIdID!The ID of the comment.
likeIdID!The ID of the like.

Returns

FieldTypeDescription
Boolean!Boolean!Returns true when the like was successfully removed.

Example

mutation RemoveCommentLike {
  RemoveCommentLike(
    commentId: "comment_abc123",
    likeId: "like_def456"
  )
}

Example Response

{
  "data": {
    "RemoveCommentLike": true
  }
}

The `likeId` can be obtained from the `userLikeId` field on a `Comment` object or from the return value of `CreateCommentLike`.

MutationUpdateComment1 pt

Update a comment

Updates the body text and/or attached asset of an existing comment. You must supply the comment's ID; all other fields are optional, so you can update just the body, just the asset, or both at once. Optionally pass the `commentableType` to specify the context (e.g., a discussion board or assignment) in which the comment lives. The acting user is determined by the `authToken` header — omitting it will apply the change under the API's default authentication context.

Arguments

NameTypeDescription
idID!The ID of the comment.
bodyStringThe updated body of the comment.
assetStringThe updated asset of the comment.
assetFileNameStringThe file name of the asset.
commentableTypeStringThe type of the comment's parent thread to be updated, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.

Returns

FieldTypeDescription
idID!The unique identifier of the comment.
commentableCommentable!The parent entity this comment belongs to — either a Topic or a Thread.
commentableIdID!The ID of the parent commentable entity (e.g., thread or topic).
commentableTypeCommentableType!The type of the parent entity. One of: thread, widgetThread, assignmentSubmission, assignment, discussionBoard.
bodyStringThe text content of the comment.
userUser!The user who authored the comment.
parentCommentCommentThe parent comment if this is a reply, otherwise null.
createdAtDateTimestamp when the comment was originally created.
updatedAtDateTimestamp when the comment was last updated.
videoAssetIDThe ID of an attached video asset, if any.
assetURLURL of an attached file asset, if any.
assetFileNameStringThe file name of the attached asset, if any.
notificationsEnabledBoolean!Whether comment notifications are enabled for the acting user.
childCommentsCommentsListPaginated list of replies to this comment.
userLikeIdIDThe ID of the current user's like on this comment, if they have liked it.
likesCountIntTotal number of likes on this comment.

Example

mutation UpdateComment {
  UpdateComment(
    id: "comment_abc123",
    body: "Thanks for the clarification — this makes much more sense now!",
    commentableType: "thread"
  ) {
    id
    body
    commentableId
    commentableType
    createdAt
    updatedAt
    notificationsEnabled
    likesCount
    user {
      id
      name
      email
    }
    asset
    assetFileName
  }
}

Example Response

{
  "data": {
    "UpdateComment": {
      "id": "comment_abc123",
      "body": "Thanks for the clarification — this makes much more sense now!",
      "commentableId": "thread_xyz789",
      "commentableType": "thread",
      "createdAt": "2024-01-15T10:00:00Z",
      "updatedAt": "2024-03-22T14:35:00Z",
      "notificationsEnabled": true,
      "likesCount": 4,
      "user": {
        "id": "user_001",
        "name": "Jane Doe",
        "email": "[email protected]"
      },
      "asset": null,
      "assetFileName": null
    }
  },
  "id": "abc-123",
  "commentable": null,
  "commentableId": "abc-123",
  "commentableType": "thread",
  "body": "example",
  "user": null,
  "parentComment": null,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "videoAsset": "abc-123",
  "asset": "https://example.com",
  "assetFileName": "example",
  "notificationsEnabled": false,
  "childComments": null,
  "userLikeId": "abc-123",
  "likesCount": 0
}

The acting user is resolved from the `authToken` request header. Only the comment's owner or an admin can update a comment; unauthorized attempts will result in an error.

MutationUpdateThread1 pt

Update an existing discussion thread

Updates the title and body of an existing thread's opening post. The current user must either own the thread or have admin access to the associated content. You may also update the optional `asset` (an image URL) or `commentableType` to recontextualize the thread's location type. The mutation returns the full updated `Thread` object. Provide the `authToken` header to perform this action on behalf of a specific user.

Arguments

NameTypeDescription
idID!The ID of the thread.
bodyString!The body of the opening comment of the thread.
titleString!The title of the comment.
assetStringThe URL of the asset.
commentableTypeCommentableTypeThe type of thread to be updated, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.

Returns

FieldTypeDescription
idID!The unique identifier of the thread.
titleStringThe updated title of the thread.
bodyStringThe updated body text of the thread's opening post.
commentsCountInt!The total number of comments on this thread.
notificationsEnabledBoolean!Whether the thread author has notifications enabled.
forumForum!The forum containing this thread.
forumIdID!The ID of the forum containing this thread.
courseCourseThe course associated with this thread, if any.
userUser!The user who authored the thread.
assetURLURL of an image asset attached to the thread.
updatedAtDateTimestamp when the thread was last updated.
createdAtDateTimestamp when the thread was originally created.

Example

mutation UpdateThread {
  UpdateThread(
    id: "thr_new001"
    title: "Updated: What did you think of Module 1?"
    body: "I've updated the question — please share both thoughts and questions."
    commentableType: course
  ) {
    id
    title
    body
    updatedAt
    commentsCount
    user {
      id
      name
    }
  }
}

Example Response

{
  "data": {
    "UpdateThread": {
      "id": "thr_new001",
      "title": "Updated: What did you think of Module 1?",
      "body": "I've updated the question — please share both thoughts and questions.",
      "updatedAt": "2024-03-21T09:15:00Z",
      "commentsCount": 3,
      "user": {
        "id": "usr_def456",
        "name": "Jane Smith"
      }
    }
  },
  "id": "abc-123",
  "course": null,
  "forum": null,
  "forumId": "abc-123",
  "client": null,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "asset": "https://example.com",
  "assetFileName": "example",
  "videoAsset": "abc-123",
  "title": "example",
  "body": "example",
  "commentsCount": 0,
  "user": null,
  "notificationsEnabled": false,
  "matchCount": 0,
  "bookmark": "abc-123"
}

Only the thread owner or an admin may update a thread. The mutation respects the `authToken` header to determine the acting user.