refactor: Use record for representation preference.

This commit is contained in:
Ruben Verborgh
2021-01-04 23:06:52 +01:00
parent 15d1ae179f
commit 4828912593
21 changed files with 107 additions and 128 deletions

View File

@@ -86,7 +86,8 @@ export class SparqlUpdatePatchHandler extends PatchHandler {
const store = new Store<BaseQuad>();
try {
// Read the quads of the current representation
const quads = await this.source.getRepresentation(identifier, { type: [{ value: INTERNAL_QUADS, weight: 1 }]});
const quads = await this.source.getRepresentation(identifier,
{ type: { [INTERNAL_QUADS]: 1 }});
const importEmitter = store.import(quads.data);
await new Promise((resolve, reject): void => {
importEmitter.on('end', resolve);