Using the child hierarchy match, you can make sure that the results you get back have a certain type of child. Too abstract? A great example is wanting to fetch the newest blog posts that have comments.  Here is how you would do this:


As you can imagine, this can make your queries quite powerful. Just like with 'parent' it is possible to make the subquery as complex as you like.  Here is an example getting the newest posts that have a comment written by Joel or Josh.

{'type':'post','child':{'type':'comment','author':['Joel Sutherland','Josh Lockhart']},'count':5,'orderBy':'-publishedAt'}