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
To simplify implementing resources backed by a SPARQL query, I'd like to have a handler, possibly exported from a dedicated package, that would make it possible declaratively. For example
Given the above, when a request for an instance of api:ExternalResource would be made, the handler would load the query from queries/external-resource.rq and run it against env.sparql.lindas endpoint.
If arg:endpoint would be omitted, the default endpoint should be used.
arg:variable maps resource contents to SPARQL inputs. The handler would follow sh:path from the request subject. Might also allow an imperative way
Open questions
What happens when there are multiple values found by resolving arg:variables? Especially in the case of multiple variables. Do we just create VALUES clause with the cartesian product?
How could we support federated queries?
The text was updated successfully, but these errors were encountered:
A problem with federated queries may be that not all stores allow the use of variables like SERVCE ?service.
For that, we may need a way to replace variables instead of generating VALUES. That should fail when multiple values are found though.
[] arg:variables [
arg:externalEndpoint [
sh:values "lindas"^^kl:endpoint ; # might need a type so that this is not loaded as a plain string
kl:inlineVariable true ; # to replace in query text
] ;
] ;
The above will replace SERVICE ?externalEndpoint with SERVICE <...lindas query endpoint URL...>
To simplify implementing resources backed by a SPARQL query, I'd like to have a handler, possibly exported from a dedicated package, that would make it possible declaratively. For example
Given the above, when a request for an instance of
api:ExternalResource
would be made, the handler would load the query fromqueries/external-resource.rq
and run it againstenv.sparql.lindas
endpoint.If
arg:endpoint
would be omitted, thedefault
endpoint should be used.arg:variable
maps resource contents to SPARQL inputs. The handler would followsh:path
from the request subject. Might also allow an imperative wayOpen questions
arg:variables
? Especially in the case of multiple variables. Do we just createVALUES
clause with the cartesian product?The text was updated successfully, but these errors were encountered: