Start a conversation

Fetching a KB Guide Information

Use the fetch KB guides information to fetch the guide IDs and identify the guide ID for which you want information.

For example, to fetch information about a KB Guide (ID:601) with its content, use the guide query.

{
  guide(id: "guide:601") {
    id
    title
    hidden
    node {
      id
    }
    totalArticlesCount
    totalChaptersCount
    firstArticle {
      uid
      subject
      body
    }
    avatar {
      url
      width
      height
    }
    contents(first: 7) {
      pageInfo {
        hasNextPage
        endCursor
        startCursor
      }
      edges {
        node {
          __typename
          ... on Chapter {
            id
            articles {
              edges {
                node {
                  id
                  uid
                }
              }
            }
          }
          ... on KBArticle {
            id
            message {
              id
              uid
            }
          }
        }
      }
    }
  }
}

GraphQL query response:

{
  "data": {
    "guide": {
      "id": "guide:601",
      "title": "Opinion of Different Companies",
      "hidden": false,
      "node": {
        "id": "board:tr-books"
      },
      "totalArticlesCount": 4,
      "totalChaptersCount": 2,
      "firstArticle": {
        "uid": 10412,
        "subject": "Test Automation",
        "body": "<P>Lorem Ipsum Special Chars</P>\n<P>draft</P>"
      },
      "avatar": null,
      "contents": {
        "pageInfo": {
          "hasNextPage": false,
          "endCursor": null,
          "startCursor": null
        },
        "edges": [
          {
            "node": {
              "__typename": "KBArticle",
              "id": "content:158",
              "message": {
                "id": "message:10412",
                "uid": 10412
              }
            }
          },
          {
            "node": {
              "__typename": "KBArticle",
              "id": "content:161",
              "message": {
                "id": "message:11927",
                "uid": 11927
              }
            }
          },
          {
            "node": {
              "__typename": "Chapter",
              "id": "chapter:153",
              "articles": {
                "edges": [
                  {
                    "node": {
                      "id": "message:11807",
                      "uid": 11807
                    }
                  },
                  {
                    "node": {
                      "id": "message:11905",
                      "uid": 11905
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments