Threads
Returns a list of threads. If providing the forumId, the courseId is also required. The results of this query can be affected by providing an authToken header to set a user for the operation.
Threads(
clientId: ID
courseId: ID
forumId: ID!
commentableType: CommentableType
page: Int
perPage: Int
): ThreadsList
Arguments
Threads.clientId
● ID
scalar
The ID of the client.
Threads.courseId
● ID
scalar
The ID of the course.
Threads.forumId
● ID!
non-null scalar
The ID of the forum.
Threads.commentableType
● CommentableType
enum
The type of thread requested, based on the forum's location, e.g. discussion board, assignment, widget thread, etc.
Threads.page
● Int
scalar
The page number to return within the collection.
Threads.perPage
● Int
scalar
The amount of items to be returned on the page.
Type
ThreadsList
object
Examples
Query:
Threads(
$clientId: ID,
$courseId: ID,
$forumId: ID!,
$commentableType: CommentableType,
$page: Int,
$perPage: Int
) {
Threads(
clientId: $clientId,
courseId: $courseId,
forumId: $forumId,
commentableType: $commentableType,
page: $page,
perPage: $perPage
) {
discussionRules
pageInfo {
...PageInfoFragment
}
threads {
...ThreadFragment
}
}
}
Variables:
{
"clientId": "58ccb96c-8e90-4464-86e0-f284442981df",
"courseId": "58ccb96c-8e90-4464-86e0-f284442981df",
"forumId": "58ccb96c-8e90-4464-86e0-f284442981df",
"commentableType": "thread",
"page": 678,
"perPage": 678
}
Response:
{
"data": {
"Threads": {
"discussionRules": "abc123",
"pageInfo": "PageInfo",
"threads": [
"Thread"
]
}
}
}