buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

construct queries #37

Closed eroux closed 6 years ago

eroux commented 6 years ago

After scratching my head on a query I wanted to make, I realized what I wanted was best queried with a construct... but I believe that if I add a construct query in lds-queries and run it through the /query/ API, it will send me JSON results in the usual form, while I believe it would be easier from a client point of view to be able to ask for .ttl (or any other serialization)... I'm not sure how the results would be best represented as we may also want some info about the time taken by the query and all this kind of things... so maybe having the resulting model serialized as json-ld? I'm not really sure what the best solution is here, but I thought it may be useful to have this discussion. I'll start the client code with the current results so it's not a blocking issue.

MarcAgate commented 6 years ago

We can first setup the return type to "Graph" in the template, then add a format param in the query url. Right now the "queryReturn" field in the template is only informative but we can normalize it (i.e parsing it for valid constant values such as Table, Value, Graph and so on..)) and go from that. That would add more possibilities to the API

eroux commented 6 years ago

I think that would be sensible yes!

MarcAgate commented 6 years ago

Implemented as of commit 7358cff