To fetch guides, chapters, and articles for your KB board, use the guides
query with the guides constraints.
InfoYou can use this information to identify the guide ID and its contents (chapter and articles).
Guides Constraints
Use the below constraints to fetch the guides, chapters, and articles in a guide or chapter.
Fields | Description | Required |
---|---|---|
nodeId | ID of the KB board | Required |
includeHidden | To include the hidden guides. By default, it is set to false . |
Optional |
includeEmpty | To include the guide with no articles. By default, it is set to false . |
Optional |
searchTerm | Search for a guide with its title and description. | Optional |
excludeGuideIds | To exclude certain guide IDs. | Optional |
includeGuideIds | To include certain guide IDs. | Optional |
Example
To fetch the information about the “Artificial Intelligence” board (board ID: AIBoard), use the guides
constraints.
GraphQL Query
query {
guides(constraints: {nodeId: {eq: "tkb:AIBoard"}, includeEmpty:{eq: true}, includeHidden:{eq: true}}) {
totalCount
pageInfo {
hasNextPage
endCursor
startCursor
hasPreviousPage
}
edges {
node {
id,
title,
description,
hidden,
node {
id
}
contents(first: 2, constraints: {includeEmpty: {eq: true}}) {
pageInfo {
hasNextPage
endCursor
startCursor
hasPreviousPage
}
edges {
node {
__typename
... on Chapter {
id
title
description
articles {
edges {
node {
id
uid
}
}
}
}
... on KBArticle {
id
message {
id
uid
body
}
}
}
}
}
}
}
}
}
GraphQL query response:
{
"data": {
"guides": {
"totalCount": 4,
"pageInfo": {
"hasNextPage": false,
"endCursor": null,
"startCursor": null,
"hasPreviousPage": false
},
"edges": [
{
"node": {
"id": "guide:598",
"title": "Artificial Intelligence",
"description": "About AI and its impact.",
"hidden": false,
"node": {
"id": "board:AIBoard"
},
"contents": {
"pageInfo": {
"hasNextPage": true,
"endCursor": "MHwxNTR8MXwyOzJ8aWU6ZXF8",
"startCursor": null,
"hasPreviousPage": false
},
"edges": [
{
"node": {
"__typename": "Chapter",
"id": "chapter:153",
"title": "Qualities of Artificial Intelligence",
"description": "Machine that responds to simulation.",
"articles": {
"edges": []
}
}
},
{
"node": {
"__typename": "Chapter",
"id": "chapter:154",
"title": "Qualities of different AI",
"description": "",
"articles": {
"edges": []
}
}
}
]
}
}
},
{
"node": {
"id": "guide:599",
"title": "Artificial Intelligence and Humans",
"description": "Digital life is augmenting human capacities and disrupting eons-old human activities.",
"hidden": false,
"node": {
"id": "board:AIBoard"
},
"contents": {
"pageInfo": {
"hasNextPage": false,
"endCursor": null,
"startCursor": null,
"hasPreviousPage": false
},
"edges": [
{
"node": {
"__typename": "Chapter",
"id": "chapter:157",
"title": "Quality",
"description": "These software systems make decisions which normally require human level of expertise.",
"articles": {
"edges": []
}
}
}
]
}
}
},
{
"node": {
"id": "guide:600",
"title": "Nature of the Humans with regard to AI",
"description": "The networked AI will amplify human effectiveness and threaten human autonomy, agency and capabilities.",
"hidden": true,
"node": {
"id": "board:AIBoard"
},
"contents": {
"pageInfo": {
"hasNextPage": false,
"endCursor": null,
"startCursor": null,
"hasPreviousPage": false
},
"edges": [
{
"node": {
"__typename": "Chapter",
"id": "chapter:156",
"title": "Qualities",
"description": "Test Qualities",
"articles": {
"edges": []
}
}
}
]
}
}
},
{
"node": {
"id": "guide:601",
"title": "Opinion of Different Companies",
"description": "This guide is about different companies",
"hidden": false,
"node": {
"id": "board:AIBoard"
},
"contents": {
"pageInfo": {
"hasNextPage": false,
"endCursor": null,
"startCursor": null,
"hasPreviousPage": false
},
"edges": [
{
"node": {
"__typename": "Chapter",
"id": "chapter:152",
"title": "tItle 5",
"description": "des",
"articles": {
"edges": []
}
}
}
]
}
}
}
]
}
}
}
What’s Next
- Adding an Article
- Moving an Article in a Chapter to any Guide
- Moving an Article in a Chapter to any Chapter
- Moving a Guide Content to any Chapter
- Moving a Guide Content to a Guide
- Reordering a Guide
- Reordering a Chapter Article
- Reordering a Guide Content in a Guide
- Deleting a Guide
- Deleting a Content from a Guide
- Deleting an Article from Chapter
ATLAS
Comments