Comments & Forum Endpoints
Fetch discussion threads and comments for videos and content pages.
Comments1 ptFetch 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
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | ID | No | The ID of the client. |
| parentId | ID | No | The ID of the parent. |
| commentableType | CommentableType! | Yes | The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc. |
| commentableId | ID! | Yes | The ID of the commentable type. |
| page | Int | No | The page number to return within the collection. |
| userId | ID | No | The ID of the user. |
Returns
| Field | Type | Description |
|---|---|---|
| pageInfo | PageInfo! | 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.
Forums1 ptFetch 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
| Name | Type | Required | Description |
|---|---|---|---|
| courseId | ID! | Yes | The ID of the course. |
| clientId | ID | No | The ID of the client. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID | Unique identifier of the forum. |
| course | Course! | The course this forum belongs to, including full course details. |
| sectionId | ID | The ID of the course section this forum is associated with, if scoped to a section. |
| label | String | Display label for the forum. |
| threadsCount | Int! | The total number of discussion threads in this forum. |
| createdAt | Date | Timestamp when the forum was created. |
| updatedAt | Date | Timestamp when the forum was last updated. |
| isGeneral | Boolean! | 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.
SearchThreads1 ptSearch 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
| Name | Type | Required | Description |
|---|---|---|---|
| widgetForumId | ID! | Yes | The ID of the Widget Forum. |
| clientId | ID | No | The ID of the client. |
| query | String | No | The search query used to return the list of threads. |
| page | Int! | Yes | The page number to return within the collection. |
| perPage | Int! | Yes | The amount of items to be returned on the page. |
| sort | String! | Yes | How the items are to be sorted. |
Returns
| Field | Type | Description |
|---|---|---|
| discussionRules | String | Optional plain-text rules or guidelines for the widget forum discussion. |
| pageInfo | PageInfo! | 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.
ThreadById1 ptFetch 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the thread. |
| clientId | ID | No | The ID of the client. |
| forumId | ID | No | The ID of the Forum. |
| commentableType | CommentableType | No | The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the thread. |
| title | String | The title or subject of the thread. |
| body | String | The main body text of the thread post. |
| commentsCount | Int! | The total number of comments posted on this thread. |
| user | User! | The user who created the thread. |
| forum | Forum! | The forum in which this thread resides. |
| forumId | ID! | The ID of the forum this thread belongs to. |
| course | Course | The course associated with this thread, if applicable. |
| client | Client | The client (tenant) this thread belongs to, if applicable. |
| createdAt | Date | The timestamp when the thread was created. |
| updatedAt | Date | The timestamp when the thread was last updated. |
| asset | URL | URL of an image or file asset attached to the thread. |
| assetFileName | String | The filename of the attached asset. |
| videoAsset | ID | The ID of a video asset attached to the thread. |
| notificationsEnabled | Boolean! | Whether the current user has notifications enabled for this thread. |
| matchCount | Int | The number of search matches within this thread, populated when returned from a search query. |
| bookmark | ID | The 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.
Threads1 ptFetch 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
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | ID | No | The ID of the client. |
| courseId | ID | No | The ID of the course. |
| forumId | ID! | Yes | The ID of the forum. |
| commentableType | CommentableType | No | The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc. |
| page | Int | No | The page number to return within the collection. |
| perPage | Int | No | The amount of items to be returned on the page. |
Returns
| Field | Type | Description |
|---|---|---|
| discussionRules | String | Optional plain-text rules or guidelines displayed to participants of the discussion forum. |
| pageInfo | PageInfo! | 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.
CreateComment1 ptCreate 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
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | ID | No | The ID of the client. |
| commentableId | ID! | Yes | The ID of the commentable entity. |
| commentableType | CommentableType! | Yes | The type of the comment's parent thread, based on the comment's location, e.g. discussion board, assignment, widget thread, etc. |
| body | String | No | The body of the comment. |
| asset | URL | No | The URL of the asset. |
| assetFileName | String | No | The file name of the asset. |
| videoAsset | ID | No | The ID of the video asset. |
| parentId | ID | No | The ID of the parent comment. |
| notificationsEnabled | Boolean! | Yes | Flag to enable notifications. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the newly created comment. |
| commentable | Commentable! | The entity (Topic or Thread) this comment belongs to. |
| commentableId | ID! | The ID of the entity this comment is attached to. |
| commentableType | CommentableType! | The type of entity being commented on (e.g., thread, assignmentSubmission, discussionBoard). |
| body | String | The text content of the comment. |
| user | User! | The user who created the comment. |
| parentComment | Comment | The parent comment if this is a reply, otherwise null. |
| childComments | CommentsList | Paginated list of replies to this comment. |
| asset | URL | URL of a file asset attached to the comment. |
| assetFileName | String | The original file name of the attached asset. |
| videoAsset | ID | The ID of a video asset attached to the comment. |
| notificationsEnabled | Boolean! | Whether the commenter has opted in to receive notifications for replies to this comment. |
| userLikeId | ID | The ID of the current user's like on this comment, if they have liked it. |
| likesCount | Int | Total number of likes this comment has received. |
| createdAt | Date | Timestamp when the comment was created. |
| updatedAt | Date | Timestamp 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
}CreateCommentLike1 ptLike 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
| Name | Type | Required | Description |
|---|---|---|---|
| commentId | ID! | Yes | The ID of the comment. |
| commentableId | ID! | Yes | The ID of the commentable entity. |
| commentableType | String! | Yes | The type of thread, based on the thread's location, e.g. discussion board, assignment, widget thread, etc. |
| clientId | ID | No | The ID of the client. |
Returns
| Field | Type | Description |
|---|---|---|
| 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.
CreateThread1 ptCreate 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
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | ID | No | The ID of the client. |
| forumId | ID! | Yes | The ID of the forum. |
| courseId | ID | No | The ID of the course. |
| layoutId | ID | No | The ID of the layout. |
| widgetTitle | String | No | The title of the widget. |
| commentableType | CommentableType | No | The type of thread to create, based on the thread's location, e.g. discussion board, assignment, widget thread, etc. |
| asset | URL | No | The URL of the asset. |
| assetFileName | String | No | The file name of the asset. |
| videoAsset | ID | No | The ID of the video asset. |
| body | String | No | The body of the comment. |
| title | String! | Yes | The title of the comment. |
| notificationsEnabled | Boolean! | Yes | Flag to enable notifications. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the newly created thread. |
| title | String | The title of the thread. |
| body | String | The body text of the thread's opening post. |
| commentsCount | Int! | The total number of comments on this thread. |
| notificationsEnabled | Boolean! | Whether the thread author has email notifications enabled for new replies. |
| forum | Forum! | The forum in which the thread was created. |
| forumId | ID! | The ID of the forum containing this thread. |
| course | Course | The course associated with this thread, if any. |
| client | Client | The client context for this thread. |
| user | User! | The user who authored the thread. |
| asset | URL | URL of an image asset attached to the thread. |
| assetFileName | String | File name of the attached image asset. |
| videoAsset | ID | ID of a video asset attached to the thread. |
| createdAt | Date | Timestamp when the thread was created. |
| updatedAt | Date | Timestamp when the thread was last updated. |
| matchCount | Int | Search match count, relevant when threads are returned in a search context. |
| bookmark | ID | ID 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.
DestroyComment1 ptDelete 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the comment. |
| commentableType | CommentableType | No | The type of the comment's parent thread to destory, based on the thread's location, e.g. discussion board, assignment, widget thread, etc. |
Returns
| Field | Type | Description |
|---|---|---|
| ID | ID | The 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.
DestroyThread1 ptDelete 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the thread. |
| commentableType | CommentableType | No | The type of thread to destroy, based on the thread's location, e.g. discussion board, assignment, widget thread, etc. |
Returns
| Field | Type | Description |
|---|---|---|
| DestroyThread | ID | The 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.
RemoveCommentLike1 ptUnlike 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
| Name | Type | Required | Description |
|---|---|---|---|
| commentId | ID! | Yes | The ID of the comment. |
| likeId | ID! | Yes | The ID of the like. |
Returns
| Field | Type | Description |
|---|---|---|
| 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`.
UpdateComment1 ptUpdate 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the comment. |
| body | String | No | The updated body of the comment. |
| asset | String | No | The updated asset of the comment. |
| assetFileName | String | No | The file name of the asset. |
| commentableType | String | No | The 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
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the comment. |
| commentable | Commentable! | The parent entity this comment belongs to — either a Topic or a Thread. |
| commentableId | ID! | The ID of the parent commentable entity (e.g., thread or topic). |
| commentableType | CommentableType! | The type of the parent entity. One of: thread, widgetThread, assignmentSubmission, assignment, discussionBoard. |
| body | String | The text content of the comment. |
| user | User! | The user who authored the comment. |
| parentComment | Comment | The parent comment if this is a reply, otherwise null. |
| createdAt | Date | Timestamp when the comment was originally created. |
| updatedAt | Date | Timestamp when the comment was last updated. |
| videoAsset | ID | The ID of an attached video asset, if any. |
| asset | URL | URL of an attached file asset, if any. |
| assetFileName | String | The file name of the attached asset, if any. |
| notificationsEnabled | Boolean! | Whether comment notifications are enabled for the acting user. |
| childComments | CommentsList | Paginated list of replies to this comment. |
| userLikeId | ID | The ID of the current user's like on this comment, if they have liked it. |
| likesCount | Int | Total 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.
UpdateThread1 ptUpdate 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
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the thread. |
| body | String! | Yes | The body of the opening comment of the thread. |
| title | String! | Yes | The title of the comment. |
| asset | String | No | The URL of the asset. |
| commentableType | CommentableType | No | The type of thread to be updated, based on the thread's location, e.g. discussion board, assignment, widget thread, etc. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the thread. |
| title | String | The updated title of the thread. |
| body | String | The updated body text of the thread's opening post. |
| commentsCount | Int! | The total number of comments on this thread. |
| notificationsEnabled | Boolean! | Whether the thread author has notifications enabled. |
| forum | Forum! | The forum containing this thread. |
| forumId | ID! | The ID of the forum containing this thread. |
| course | Course | The course associated with this thread, if any. |
| user | User! | The user who authored the thread. |
| asset | URL | URL of an image asset attached to the thread. |
| updatedAt | Date | Timestamp when the thread was last updated. |
| createdAt | Date | Timestamp 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.