Line with only a comment leads to an exception when using name_service
Closed this issue · 2 comments
graue70 commented
The query
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
# A line containing only whitespace and a comment breaks the query
wd:Q90 @en@rdfs:label ?label .
}
LIMIT 10
leads to
even though running
query = `PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
# A line containing only whitespace and a comment breaks the query
wd:Q90 @en@rdfs:label ?label .
}
LIMIT 10`
url = new URL("https://qlever.informatik.uni-freiburg.de/api/wikidata-proxy")
url.search = new URLSearchParams({query: query})
url.toString()
in javascript gives a URL that works without error.
graue70 commented
Interestingly, the following javascript code gives a URL which returns an error:
query = `PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
# A line containing only whitespace and a comment breaks the query
wd:Q90 @en@rdfs:label ?label .
}
LIMIT 10`
name_service = true // If you change this to false, the URL works
send = 40
url = new URL("https://qlever.informatik.uni-freiburg.de/api/wikidata-proxy")
url.search = new URLSearchParams({query: query, name_service: name_service, send: send})
url.toString()
graue70 commented
I opened ad-freiburg/qlever#412 because this is probably not related to the UI after all.