Headless Server Developer Manual / Version 2404
Table Of ContentsTo use Dynamic Query Lists with Headless Server, Headless Server Search needs to be set up (see Section 6.1.1, “Content Query Form” in Blueprint Developer Manual for details about Dynamic Query List content).
Dynamic Query Lists are handled with the queryListAdapter
. The following functionality is
supported:
- Paging
- Limiting the result size
- Filter by predefined fields
- Sort by predefined fields
The following GraphQL query is a simple example for fetching data from a CMQueryList content.
{ content { queryList(id: "7692") { title items { ... on CMLinkable { title } } } } }
The following parameter can be passed to the QueryListAdapter
to customize the Dynamic
Query List result:
- offset: The offset for paging. Available as
pagedItems
in graphql schema.
The following GraphQL query is a simple example for fetching paged data from a CMQueryList content.
{ content { queryList(id: "7692") { title pagedItems(offset: 3) { title } } } }
Dynamic Query List configuration is read from the content using configuration that can be applied in Studio.
General configuration:
-
Content Types
A selection of content types.
-
Limit
Limit of the Dynamic Query List items.
-
Sort Field
The field to sort on.
-
Order
The sort order
Search filter configuration:
-
Authors
The authors of the document.
-
Context Documents
The context of the document.
-
Modification Date
The modification date defines as interval.
-
Location Tag
The content is tagged with the given location tag.
-
Subject Tag
The content is tagged with the given subject tag.
-
Tag Context
The content is tagged with one of the tags of the query list's context.
Valid from and valid to conditions are applied to search filters automatically.
Dynamic Query List Configuration
Caching for dynamic query lists is only performed in live mode and can be configured with
caas.search.cache.querylist-search-cache-for-seconds