Sample query: fetching topic content based on topic type and section content based on section type
You can make queries for specific types of topics using the ...on command, and you can select specific types of sections by using a section name filter.
{
ishTopic(url:"2778701/1184166/penguin-guide/great-penguins-aptenodytes-") {
title
__typename
...on IshLearningContentTopic {
body {
sections(sectionNameFilter: "lcIntro") {
type
xhtml
}
}
}
}
}
First, the ...on IshLearningContentTopic { } fragment is only executed if the topic being referenced by the url property is a topic of type learningContentTopic.
Second, the sectionNameFilter: "lcIntro" parameter-value pair ensures that the only sections for which type and xhtml are returned are lcIntro sections in the learning content topic.