[Bug] Value in "Limit returned neighbors to" is exceeded (SPARQL ENDPOINT)
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 108
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 5
Description
Hello,
I'm using graph-explorer:1.3.1, have a SPARQL endpoint and try to query a nodes neighbor with the "Limit returned neighbors to" set to 5. The generated SPARQL query was:
```sparql
SELECT ?subject ?pred ?value ?subjectClass ?pToSubject ?pFromSubject {
?subject a ?subjectClass;
?pred ?value {
SELECT DISTINCT ?subject ?pToSubject ?pFromSubject {
BIND( AS ?argument)
VALUES ?subjectClass { }
{
?argument ?pToSubject ?subject.
?subject a ?subjectClass;
?sPred ?sValue .
}
UNION
{
?subject ?pFromSubject ?argument;
a ?subjectClass;
?sPred ?sValue .
}
}
LIMIT 5 OFFSET 0
}
FILTER(isLiteral(?value))
}
```
The limit in the subquery works fine e.g.
```sparql
SELECT DISTINCT ?subject ?pToSubject ?pFromSubject {
BIND( AS ?argument)
VALUES ?subjectClass { }
{
?argument ?pToSubject ?subject.
?subject a ?subjectClass;
?sPred ?sValue .
}
UNION
{
?subject ?pFromSubject ?argument;
a ?subjectClass;
?sPred ?sValue .
}
}
```
But the surrounding query returns way more than five entries and so does the graph-explorer. In the following example it returned 6 neighbors but the deviation varies:

I would like to have the exact number of neighbors I selected previously.
Kind regards Stefan
Contributor guide
Assessment
This issue has not been assessed yet.