Skip to main content

CatalogContent

Returns a user's catalog content items and meta data matching with the criteria when an authToken is provided. When a token is not provided, a default profile will be provided which returns the instances catalog. 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 3 points.

Arguments

CatalogContent.layoutId ● ID scalar

The id of the custom catalog widget layout.

CatalogContent.widgetId ● ID scalar

The id of the custom catalog widget.

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 is relevance, it requires the argument query also to be set, or it falls back to value courseStartDate.

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 argument sortColumn is relevance, it requires the argument query also to be set, or it falls back to value desc.

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 is calendar, it overrides the values for argument sortColumn to be displayDate and sortDirection to be asc.

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

Run in Postman

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": "58ccb96c-8e90-4464-86e0-f284442981df",
"widgetId": "58ccb96c-8e90-4464-86e0-f284442981df",
"sort": "xyz789",
"sortColumn": "updatedAt",
"sortDirection": "asc",
"resultsDisplayType": "list",
"page": 678,
"token": "xyz789",
"labels": [
"xyz789"
],
"values": [
"abc123"
],
"contentTypes": [
"xyz789"
],
"query": "xyz789"
}

Response:

{
"data": {
"CatalogContent": {
"contentItems": [
"Content"
],
"meta": "CatalogMeta"
}
}
}