UpdateThread
Updates the opening comment of the thread using the current user. The current user must have access to the content or be an admin to update the thread. The results of this mutation can be affected by providing an authToken header to set a user for the operation.
UpdateThread(
id: ID!
body: String!
title: String!
asset: String
commentableType: CommentableType
): Thread
Arguments
UpdateThread.id
● ID!
non-null scalar
The ID of the thread.
UpdateThread.body
● String!
non-null scalar
The body of the opening comment of the thread.
UpdateThread.title
● String!
non-null scalar
The title of the comment.
UpdateThread.asset
● String
scalar
The URL of the asset.
UpdateThread.commentableType
● CommentableType
enum
The type of thread to be updated, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.
Type
Thread
object
Examples
Query:
UpdateThread(
$id: ID!,
$body: String!,
$title: String!,
$asset: String,
$commentableType: CommentableType
) {
UpdateThread(
id: $id,
body: $body,
title: $title,
asset: $asset,
commentableType: $commentableType
) {
id
course {
...CourseFragment
}
forum {
...ForumFragment
}
forumId
client {
...ClientFragment
}
createdAt
updatedAt
asset
assetFileName
videoAsset
title
body
commentsCount
user {
...UserFragment
}
notificationsEnabled
matchCount
bookmark
}
}
Variables:
{
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"body": "abc123",
"title": "abc123",
"asset": "xyz789",
"commentableType": "thread"
}
Response:
{
"data": {
"UpdateThread": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"course": "course-1",
"forum": "Forum",
"forumId": "58ccb96c-8e90-4464-86e0-f284442981df",
"client": "client-1",
"createdAt": "2024-06-20T16:58:58.782Z",
"updatedAt": "2023-12-20T16:58:58.782Z",
"asset": "URL",
"assetFileName": "abc123",
"videoAsset": "58ccb96c-8e90-4464-86e0-f284442981df",
"title": "xyz789",
"body": "xyz789",
"commentsCount": 678,
"user": "User",
"notificationsEnabled": false,
"matchCount": 678,
"bookmark": "58ccb96c-8e90-4464-86e0-f284442981df"
}
}
}