CatalogContent
Returns catalog content items and meta data matching with the criterias. The results of this query can be affected by providing an authToken header to set a user for the operation. This query has an additional cost of 3 points.
CatalogContent(
layoutId: ID
widgetId: ID
sort: String
sortColumn: SortColumn
sortDirection: SortDirection
resultsDisplayType: ContentItemDisplayType
page: Int!
token: String
labels: [String!]
values: [String!]
contentTypes: [String!]
query: String
): CatalogContent!
Directives
complexity
This has an additional cost of
3points.
Arguments
CatalogContent.sortColumn ● SortColumn enum
The content data column used to sort the collection. Defaults to the value configured for catalog from the user's Thought Industries instance. If the catalog is not configured, it falls back to value
createdAt. When the value isrelevance, it requires the argumentqueryalso to be set, or it falls back to valuecourseStartDate.
CatalogContent.sortDirection ● SortDirection enum
The direction used to sort the collection. Defaults to the value configured for catalog from the user's Thought Industries instance. If the catalog is not configured, it falls back to value
desc. When the argumentsortColumnisrelevance, it requires the argumentqueryalso to be set, or it falls back to valuedesc.
CatalogContent.resultsDisplayType ● ContentItemDisplayType enum
The display type. Defaults to the value configured for catalog from the user's Thought Industries instance. If the catalog is not configured, it falls back to value
grid. When the value iscalendar, it overrides the values for argumentsortColumnto bedisplayDateandsortDirectionto beasc.
CatalogContent.page ● Int! non-null scalar
The page number to return within the collection.
CatalogContent.token ● String scalar
The secure catalog query. The value is encoded by the secret key of user's Thought Industries instance.
CatalogContent.labels ● [String!] list scalar
The list of aggregation labels. The order of list items will match with argument
labels. Labels are custom fields.
CatalogContent.values ● [String!] list scalar
The list of aggregation values. The order of list items will match with argument
values. Values are custom fields.
CatalogContent.contentTypes ● [String!] list scalar
The list of content types to be queried.
CatalogContent.query ● String scalar
The search query.
Type
CatalogContent object
Examples
Query:
CatalogContent(
$layoutId: ID,
$widgetId: ID,
$sort: String,
$sortColumn: SortColumn,
$sortDirection: SortDirection,
$resultsDisplayType: ContentItemDisplayType,
$page: Int!,
$token: String,
$labels: [String!],
$values: [String!],
$contentTypes: [String!],
$query: String
) {
CatalogContent(
layoutId: $layoutId,
widgetId: $widgetId,
sort: $sort,
sortColumn: $sortColumn,
sortDirection: $sortDirection,
resultsDisplayType: $resultsDisplayType,
page: $page,
token: $token,
labels: $labels,
values: $values,
contentTypes: $contentTypes,
query: $query
) {
contentItems {
...ContentFragment
}
meta {
...CatalogMetaFragment
}
}
}
Variables:
{
"layoutId": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
"widgetId": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
"sort": "abc123",
"sortColumn": "updatedAt",
"sortDirection": "asc",
"resultsDisplayType": "list",
"page": 116,
"token": "xyz789",
"labels": [
"xyz789"
],
"values": [
"abc123"
],
"contentTypes": [
"abc123"
],
"query": "abc123"
}
Response:
{
"data": {
"CatalogContent": {
"contentItems": [
"Content"
],
"meta": "CatalogMeta"
}
}
}