You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Providing a declarative way to make hierarchical (and possibly nested) selections of information about entities, that return data structured into a tree (perhaps JSON-LD) would be a useful feature.
Evidence for the utility can be found in the success of Datomic pull syntax and how it's been copied into other stores. It supports a similar usecase to GraphQL, but is I believe better designed and supports namespaced properties.
Providing a SPARQL feature similar to pull syntax would I think be highly valuable; however I suspect the size of the feature may be too big for a point release and would perhaps need to be part of a bigger effort SPARQL 2.0 effort?! Regardless I mention it to document the idea.
It would also I think be a much better solution to #48 which I filed, which is largely trying to solve the same problem some time ago.
Unlike RDF Datomic has an explicit schema that documents the cardinality of properties; so there may need to be affordances in the specification/implementations to handle the fact that a predicate may have one or many values.
Considerations for backward compatibility
It should be implemented as not to break anything, but will likely require significant additions to the SPARQL grammar.
The text was updated successfully, but these errors were encountered:
This issue is similar to my proposal in #127 in the following regard:
Both issues are in the core about extracting graph fragments with a starting node with the ultimate goal to facilitate an object mapping. It is a form of object mapping:
Unlike RDF Datomic has an explicit schema that documents the cardinality of properties
My proposal is about enhancing the CONSTRUCT query form so that it is possible to extract graph fragments upon which a subsequent object mapping can be applied. I recently described an example about retrieval of rdf:Lists via SPARQL with a subsequent declarative object mapping to objects here.
So achieving full control over a JSON mapping would certainly work with a combination of my described rooted construct queries and a separate schema definition - I wonder whether this can be combined into compact syntax for the JSON use case.
Why?
Providing a declarative way to make hierarchical (and possibly nested) selections of information about entities, that return data structured into a tree (perhaps JSON-LD) would be a useful feature.
Evidence for the utility can be found in the success of Datomic pull syntax and how it's been copied into other stores. It supports a similar usecase to GraphQL, but is I believe better designed and supports namespaced properties.
Providing a SPARQL feature similar to pull syntax would I think be highly valuable; however I suspect the size of the feature may be too big for a point release and would perhaps need to be part of a bigger effort SPARQL 2.0 effort?! Regardless I mention it to document the idea.
It would also I think be a much better solution to #48 which I filed, which is largely trying to solve the same problem some time ago.
Previous work
Proposed solution
An RDF-like variant for illustration might look like this.
It would then return a tree (presumably in something like JSON-LD):
Unlike RDF Datomic has an explicit schema that documents the cardinality of properties; so there may need to be affordances in the specification/implementations to handle the fact that a predicate may have one or many values.
Considerations for backward compatibility
It should be implemented as not to break anything, but will likely require significant additions to the SPARQL grammar.
The text was updated successfully, but these errors were encountered: