Skip to main content

SearchThreads

This query returns a list of threads based on a search query provided. It also only works for widet threads. The results of this query can be affected by providing an authToken header to set a user for the operation.

SearchThreads(
widgetForumId: ID!
clientId: ID
query: String
page: Int!
perPage: Int!
sort: String!
): ThreadsList!

Arguments

SearchThreads.widgetForumId ● ID! non-null scalar

The ID of the Widget Forum.

SearchThreads.clientId ● ID scalar

The ID of the client.

SearchThreads.query ● String scalar

The search query used to return the list of threads.

SearchThreads.page ● Int! non-null scalar

The page number to return within the collection.

SearchThreads.perPage ● Int! non-null scalar

The amount of items to be returned on the page.

SearchThreads.sort ● String! non-null scalar

How the items are to be sorted.

Type

ThreadsList object

Examples

Run in Postman

Query:

SearchThreads(
$widgetForumId: ID!,
$clientId: ID,
$query: String,
$page: Int!,
$perPage: Int!,
$sort: String!
) {
SearchThreads(
widgetForumId: $widgetForumId,
clientId: $clientId,
query: $query,
page: $page,
perPage: $perPage,
sort: $sort
) {
discussionRules
pageInfo {
...PageInfoFragment
}
threads {
...ThreadFragment
}
}
}

Variables:

{
"widgetForumId": "58ccb96c-8e90-4464-86e0-f284442981df",
"clientId": "58ccb96c-8e90-4464-86e0-f284442981df",
"query": "abc123",
"page": 678,
"perPage": 678,
"sort": "abc123"
}

Response:

{
"data": {
"SearchThreads": {
"discussionRules": "abc123",
"pageInfo": "PageInfo",
"threads": [
"Thread"
]
}
}
}