Content Library

Query content library articles

Use the contentLibraryquery to retrieve a list of content elements.

Available Arguments

Arguments

Type

Description

categories

[ID]

Optional filter by category, default to all when not present or empty

enablePersonalizedContent

Boolean

Optional to only return content personalized by program rules.

isRead

Boolean

Optional to filter by read status.

Available Fields

ield

Description

Type

categories

[ContentCategoryType]

List of categories.

createdAt

DateTime

Content library creation date, format: YYYY-MM-DDT hh:mm:ssZ

id

ID!

Id of content library.

imageUrl

String

Content thumbnail image URL.

isBlocked

Boolean

True makes the content unavailable to the users, otherwise False.

isFavorite

Boolean

True marks the content as favorite, otherwise False.

isFeatured

Boolean

True marks the content as featured, otherwise False.

isRead

Boolean

True if the content element has been marked as read or completed.

lang

JSONString

Json with content library translated.

order

Int!

Used to set category order(The highest value sits on top).

programs

[Program!]

List of programs the content is available to.

sourceUrl

String

Link to the source content.

subTitle

String

Content subtitle.

tags

[ContentTagType!]

List of tags.

title

String

Content Title.

updatedAt

DateTime

Content library last update format: YYYY-MM-DDT hh:mm:ssZ

Example with Category Filter

{
  contentLibrary(
    categories: ["Q2F0ZWdvcnk6MTBhYjhhN2YtZDk5OC00ZWRjLThhMTItMmViMWJhMDM3NWE4"]
  ) {
    edges {
      node {
        id
        title
        subTitle
        categories {
          id
          name
          image
        }
        tags {
          id
          name
        }
        imageUrl
        sourceUrl
        order
        isFavorite
        isFeatured
        isBlocked
        isRead
      }
    }
  }
}

Example with Tag and Read Status Filter

{
 contentLibrary (tags:"something" isRead:true) {
     edges{
         node{
             title
             isRead
             tags{
                 name
                 id
             }
         }
     }
 }

Example Obtaining Personalized Content

 contentLibrary(enablePersonalizedContent: true) {
    edges {
      node {
        id 
        title 
        tags { 
          name 
        }
      }
    }
  }

Last updated