Sample query: fetching all topics in a publication
You can fetch all topics in a publication and decide, based on the type of topic, which parts of its content you want to render.
All DITA topics in a publication can have certain properties, such as a title, a short description or abstract, an ID, a URL and a set of related links.
Additionally, all DITA topics of a specific topic type can have further properties. For example, if the topic type is task, a DITA topic of that type can have a prereq section, a steps section, and so on.
{
ishTopics(filter: {publicationIds: [2778701]}, topicRenderingOptions: FAST_RENDER_IMAGES) {
edges {
node {
__typename
title
shortDescription
itemId
url
abstract {
xhtml
links {
cmUri
title
type
uri
}
}
relatedLinks {
links {
cmUri
title
type
uri
}
}
... on IshLearningContentTopic {
body {
sections {
title
type
xhtml
links {
cmUri
title
type
uri
}
}
}
}
... on IshLearningOverviewTopic {
body {
sections {
title
type
xhtml
}
}
}
... on IshConceptTopic {
body {
examples {
title
xhtml
}
sections {
title
type
xhtml
}
}
}
... on IshGenericTopic {
body {
sections {
title
xhtml
}
}
}
... on IshTaskTopic {
body {
sections {
title
type
xhtml
}
context {
title
xhtml
}
examples {
title
xhtml
}
postreq {
title
xhtml
}
prereq {
title
xhtml
}
steps {
title
xhtml
}
}
}
nestedTopics {
title
__typename
abstract {
xhtml
links {
cmUri
title
type
uri
}
}
links {
title
uri
cmUri
type
}
}
}
}
}
}
Note that for a topic of a type that is not listed, such as a reference topic, only the common properties such as title and short description will be returned.