title: Querying a Graph path in SPARQL
body: <p>I am trying to write a SPARQL query to return a path from a source to a destination.
  Below is the Turtle file representing the data set.</p>
  
  <pre><code>@prefix node: &lt;http://prism.uvsq.fr/&gt;.
  @prefix edge: &lt;http://prism.uvsq.fr#&gt;.
  node:a edge:p node:b.
  node:a edge:q node:f.
  node:a edge:p node:g.
  node:b edge:p node:c.
  node:c edge:q node:h.
  node:c edge:p node:i.
  node:c edge:p node:d.
  node:d edge:p node:e.
  node:f edge:p node:g.
  node:f edge:q node:l.
  node:f edge:p node:k.
  node:g edge:p node:c.
  node:g edge:p node:f.
  node:h edge:p node:n.
  node:i edge:q node:j.
  node:j edge:p node:o.
  node:j edge:q node:n.
  node:k edge:p node:l.
  node:l edge:p node:g.
  node:m edge:q node:g.
  node:n edge:p node:m.
  </code></pre>
  
  <p>The image next presents the same information, for easier visualization.</p>
  
  <p><img src="https://i.stack.imgur.com/zt86V.jpg" alt="Graph nodes and edges"></p>
  
  <p>The query I wrote so far is the following:</p>
  
  <pre><code>prefix graph: &lt;http://prism.uvsq.fr/&gt;
  prefix node: &lt;http://prism.uvsq.fr/&gt;
  prefix edge: &lt;http://prism.uvsq.fr#&gt;
  SELECT * FROM graph: WHERE {
     node:a (edge:p|edge:q) ?des.
     ?des (edge:p|edge:q)* node:h.
  }
  </code></pre>
  
  <p>The returned information only shows one level of the solution (it shows the possible neighbor nodes for reaching the destination).
  Thanks in advance for your help.
  Best Regards</p>