Including children is the most common type of includer.  For example, you might want to include comments when you retrieve blog posts or include subpages when you're building your main navigation.

The two things you need to do when including children are 1. giving the set a name and 2. putting together the children query.  Here is an example of grabbing blog posts with comments -- we're naming them blogcomments:


The results that you get back will then have these available as a subobject.  So you could get these under:


You can do any type of query when including children, the same HiFi Query rules apply.  It is even possible to include two groups:

{'type':'post':'parent','count':5,'orderBy':'-publishedAt','children':{'comments':{'type':'comment'},'devComments':{'type':'comment','author':['Kris Jordan','Joel Sutherland']}}}

These would have the information available under both:


It's worth noting that some comments would presumably show up in both.

It is also worth noting that it is possible to nest children as deeply as you like in the subqueries.