title: Getting children of an objects connected through link objects in SPARQL
body: <p>I'm trying to figure out a SPARQL query for getting all children of an object in a system based on a rdf store where links between objects might have properties, and therefore designed that every link is a separate object and is connected with corresponding objects by &quot;parent&quot; and &quot;child&quot; predicates like so (<a href="https://i.stack.imgur.com/nw5kY.png" rel="nofollow noreferrer">illustration link</a>) :</p>
  <pre><code>@prefix o: &lt;http://helloworld.org/object#&gt; .
  @prefix r: &lt;http://helloworld.org/relation#&gt; .
  @prefix l: &lt;http://helloworld.org/link#&gt; .
  
  l:link1-11
      r:parent o:object1 ;
      r:child o:object11 .
  l:link1-12 
      r:parent o:object1 ;
      r:child o:object12 .
  l:link12-121
      r:parent o:object12 ;
      r:child o:object121 .
  </code></pre>
  <p>I'm relatively new to graph DBs so i'm not sure if such recursive query is possible with current links design (i've come up only with a finite-depth query with many unions). Is it possible to make such a query or should i somehow redo the design?</p>