Threads
This query returns a list of threads. 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": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
 "courseId": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
 "forumId": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
 "commentableType": "thread",
 "page": 116,
 "perPage": 116
}
Response:
{
  "data": {
    "Threads": {
      "discussionRules": "abc123",
      "pageInfo": "PageInfo",
      "threads": [
        "Thread"
      ]
    }
  }
}