fix: Use base IRI when parsing SPARQL update queries

Accept relative references in SPARQL updates
This commit is contained in:
Noel De Martin
2020-12-24 12:43:56 +01:00
committed by Joachim Van Herwegen
parent 76def28a68
commit 775aaa79cd
3 changed files with 24 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ export class SparqlUpdateBodyParser extends BodyParser {
let algebra: Algebra.Operation;
try {
const sparql = await readableToString(toAlgebraStream);
algebra = translate(sparql, { quads: true });
algebra = translate(sparql, { quads: true, baseIRI: metadata.identifier.value });
} catch (error: unknown) {
this.logger.warn('Could not translate SPARQL query to SPARQL algebra', { error });
if (error instanceof Error) {