title: SPARQL Property path for all properties of certain type
body: <p>I want to a query to load a resource and automatically load all resources connected by a 'DependencyProperty'.</p>
  
  <p>The query below does what I want up to 3 levels deep. I'm wondering if it can be altered - potentially with property paths? - in such a way that there is no limit to how deep it goes.</p>
  
  <pre><code>SELECT * WHERE { 
      :resourceToLoad ?p ?o.
      OPTIONAL { 
          ?p rdf:type :DependencyProperty.
          ?o ?p2 ?o2.
          OPTIONAL { 
              ?p2 rdf:type :DependencyProperty.
              ?o2 ?p3 ?o3.
              OPTIONAL { 
                  ?p3 rdf:type :DependencyProperty.
                  ?o3 ?p4 ?o4.
              }
          }
      }
  }
  </code></pre>