Closed simonvbrae closed 10 months ago
When there is no Graph the function returns the BGP itself: https://github.com/joachimvh/SPARQLAlgebra.js/blob/b14f2351d3fe95a2ccce1d02e163ed5d268ea496/lib/sparql.ts#L984-L986
If you mean that the graph
value can be undefined, that same if-statement would have to be triggered. But that seems like something might have gone wrong earlier as the typings of a Pattern define that the graph
value should always be defined.
Good to know! I'll look for why a pattern without a graph is defined. The graph value is indeed undefined, leading an error when .value
is called in the if statement.
The query that results in an error is the following:
SELECT ?s
WHERE {
graph <http://graph.ucdavis.edu/> {
?s ?p ?o.
filter(uri(?s))
}
GRAPH <http://other.ucdavis.edu/> {
?s ?p ?o.
}
}
In the function
potentialGraphFromPatterns
, when elements in thepatterns
array don't have a graph property. What should the function return?Such an occurrence causes the bug described in this issue: Issue: https://github.com/comunica/comunica/issues/1223