Article
An article from a Knowledge Base. Each article can be assigned to one category.
To fetch multiple Knowledge Bases with related articles:
query KbArticles {
articles {
totalCount
totalPageCount
edges {
node {
attachments {
nodes {
id
}
}
body
category {
id
}
createdAt
deletedAt
description
id
ratings {
nodes {
id
}
}
ratingsType
relatedArticles{
nodes {
id
}
}
tags
updatedAt
... on Publishable {
author {
id
email
}
description
featured
meta {
description
robots
}
openGraph {
description
imageUrl
title
}
pageTitle
position
publishedAt
slug
state
title
updater {
id
email
}
}
}
}
}
}
To fetch only the latest 5 articles:
query KbArticles {
articles(
first: 5,
filter: {
knowledgeBase: "Support"
},
orderBy: {
field: UPDATED_AT,
direction: DESC
}
){
totalCount
totalPageCount
edges {
node {
id
title
}
}
}
}
To search for articles:
query KbArticles {
articles(
filter: {
knowledgeBase: "Support",
keywords: "rad"
}
){
totalCount
totalPageCount
edges {
node {
id
title
}
}
}
}
type Article implements Node, Publishable, Timestamped {
attachments(
after: String
before: String
first: Int
last: Int
): ArticleAttachmentConnection
author: Agent
body: String
category: KbCategory
createdAt: DateTime!
currentSlug: String
currentVersion: ArticleVersion
deletedAt: DateTime
description: String
featured: Boolean!
id: ID!
knowledgeBase: KnowledgeBase!
latestVersion: ArticleVersion
meta: Meta
openGraph: OpenGraph
pageTitle: String
position: Int!
previousSlugs: [String!]!
publishedAt: DateTime
ratings(
after: String
before: String
first: Int
last: Int
): ArticleRatingConnection
ratingsType: ArticleRatingTypes
relatedArticles(
after: String
before: String
first: Int
last: Int
): ArticleConnection
slug: String
state: PublishState!
tags: [String!]
title: String
updatedAt: DateTime!
updater: Agent
url: String
}
Fields
Article.attachments ● ArticleAttachmentConnection object common
The list of attachments on the article.
Article.attachments.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Article.attachments.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Article.attachments.first ● Int scalar common
Returns the first n elements from the list.
Article.attachments.last ● Int scalar common
Returns the last n elements from the list.
Article.author ● Agent object common
The author of the object.
Article.body ● String scalar common
The body of the article.
Article.category ● KbCategory object common
The category that the article is assigned to.
Article.createdAt ● DateTime! non-null scalar common
The date and time that the object was created.
Article.currentSlug ● String scalar common
The current slug for the article.
Article.currentVersion ● ArticleVersion object common
The current version of the article.
Article.deletedAt ● DateTime scalar common
The date and time that the article was deleted.
Article.description ● String scalar common
The article description.
Article.featured ● Boolean! non-null scalar common
True if the object is set to be featured; false otherwise.
Article.id ● ID! non-null scalar common
Article.knowledgeBase ● KnowledgeBase! non-null object common
The Knowledge Base that the article belongs to to.
Article.latestVersion ● ArticleVersion object common
The latest version of the article.
Article.meta ● Meta object common
The meta data of the object.
Article.openGraph ● OpenGraph object common
The Open Graph information of the object.
Article.pageTitle ● String scalar common
The HTML page title of the object.
Article.position ● Int! non-null scalar common
The position that the article should appear in when listed.
Article.previousSlugs ● [String!]! non-null scalar common
Historical slugs (oldest first), excluding the current slug.
Article.publishedAt ● DateTime scalar common
The date and time that the object was last published.
Article.ratings ● ArticleRatingConnection object common
The article ratings.
Article.ratings.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Article.ratings.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Article.ratings.first ● Int scalar common
Returns the first n elements from the list.
Article.ratings.last ● Int scalar common
Returns the last n elements from the list.
Article.ratingsType ● ArticleRatingTypes enum common
The type of the article ratings.
Article.relatedArticles ● ArticleConnection object common
The list of articles linked to this one.
Article.relatedArticles.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Article.relatedArticles.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Article.relatedArticles.first ● Int scalar common
Returns the first n elements from the list.
Article.relatedArticles.last ● Int scalar common
Returns the last n elements from the list.
Article.slug ● String scalar common
The URL slug of the object.
Article.state ● PublishState! non-null enum common
The state of the object.
Article.tags ● [String!] list scalar common
The list of tags on associated with the article.
Article.title ● String scalar common
The title of the object.
Article.updatedAt ● DateTime! non-null scalar common
The date and time that the object was last updated.
Article.updater ● Agent object common
The agent that last updated the object.
Article.url ● String scalar common
The URL of the article.
Interfaces
Node interface common
An object with an ID.
Publishable interface common
An object that can be published, for example Knowledge Base categories or articles.
For example:
... on Publishable {
author {
id
email
}
description
featured
meta {
description
robots
}
openGraph {
description
imageUrl
title
}
pageTitle
position
publishedAt
slug
state
title
updater {
id
email
}
}
Timestamped interface common
An object with timestamp fields for when it was created and last updated.
Member of
ArticleConnection object ● ArticleEdge object