Retrieve children content with graphql with a single query
Hello, Umbraco comunity. I use Umbraco Heartcore as a headless cms, and I have content node and it's children. And it seems like I'm able to retrieve all children's content with single request like: https://cdn.umbraco.io/content/{id}/children
But I don't know how to repeat the same request with graphql, seems in graphql children are all under the ContentConnection type, so how to perform some data aggregation on this type during to a single request?
in graphql I have something like this
query {
MyEntity(url: "entityurl") {
id
children {
// how to retrieve children content here?
}
}
}
Hi, I used to try query like you wrote but I was unable to retrieve content from the children, like if MyEntity has some ChildEntity content node, how can I retrieve it, for example way like this didn't work for me:
query {
MyEntity(url: "entityurl") {
id
children {
items {
name,
... on ChildEntity {
title,
description
}
}
}
}
}
Retrieve children content with graphql with a single query
Hello, Umbraco comunity. I use Umbraco Heartcore as a headless cms, and I have content node and it's children. And it seems like I'm able to retrieve all children's content with single request like:
https://cdn.umbraco.io/content/{id}/children
But I don't know how to repeat the same request with graphql, seems in graphql children are all under the
ContentConnection
type, so how to perform some data aggregation on this type during to a single request? in graphql I have something like thisHi there
Like so:
Hi, I used to try query like you wrote but I was unable to retrieve content from the children, like if MyEntity has some ChildEntity content node, how can I retrieve it, for example way like this didn't work for me:
This looks correct but you need to get rid of the commas :D
is working on a reply...