I have write below query in GraphQL but it returing error
query {
pageCollection(limit: 10) {
items {
contentSectionCollection(limit: 5) {
items {
heading
subSectionCollection(limit: 5) {
items {
... on Link {
name
url
}
... on MenuItems {
itemName
itemLink
}
}
}
}
}
}}}
I am getting the following error message when I execute this query:
“message”: “Query execution error. Link from entry ‘2a5FbawGI23CVMfzwh6r7k’ to entry ‘2ckO708SEG6Z8X1TzVJS0V’ on field ‘subSection’ within type ‘Section’ returned an unexpected content type”,
I need to return two types of data in the subSectionCollection. Sometimes it may have only one value, and other times it may have both values.
1