fix: Support empty PATCH requests

This commit is contained in:
Joachim Van Herwegen
2021-06-10 16:09:53 +02:00
parent a6371b0735
commit ded263a81d
6 changed files with 139 additions and 10 deletions

View File

@@ -47,6 +47,12 @@ export class SparqlUpdatePatchHandler extends PatchHandler {
// Verify the patch
const { source, identifier, patch } = input;
const op = (patch as SparqlUpdatePatch).algebra;
// In case of a NOP we can skip everything
if (op.type === Algebra.types.NOP) {
return [];
}
this.validateUpdate(op);
return this.applyPatch(source, identifier, op);