Skip to main content

ThreadById

Returns the thread for the ID provided. The results of this query can be affected by providing an authToken header to set a user for the operation.

ThreadById(
id: ID!
clientId: ID
forumId: ID
commentableType: CommentableType
): Thread

Arguments

ThreadById.id ● ID! non-null scalar

The ID of the thread.

ThreadById.clientId ● ID scalar

The ID of the client.

ThreadById.forumId ● ID scalar

The ID of the Forum.

ThreadById.commentableType ● CommentableType enum

The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc.

Type

Thread object

Examples

Run in Postman

Query:

ThreadById(
$id: ID!,
$clientId: ID,
$forumId: ID,
$commentableType: CommentableType
) {
ThreadById(
id: $id,
clientId: $clientId,
forumId: $forumId,
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",
"clientId": "58ccb96c-8e90-4464-86e0-f284442981df",
"forumId": "58ccb96c-8e90-4464-86e0-f284442981df",
"commentableType": "thread"
}

Response:

{
"data": {
"ThreadById": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"course": "course-1",
"forum": "Forum",
"forumId": "58ccb96c-8e90-4464-86e0-f284442981df",
"client": "client-1",
"createdAt": "2023-12-20T16:58:58.782Z",
"updatedAt": "2024-06-20T16:58:58.782Z",
"asset": "URL",
"assetFileName": "abc123",
"videoAsset": "58ccb96c-8e90-4464-86e0-f284442981df",
"title": "xyz789",
"body": "abc123",
"commentsCount": 678,
"user": "User",
"notificationsEnabled": false,
"matchCount": 678,
"bookmark": "58ccb96c-8e90-4464-86e0-f284442981df"
}
}
}