MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / applyPatch

Function applyPatch

lib/handlers/patch.mjs:185–197  ·  view source on GitHub ↗
(patchObject, graph, url)

Source from the content-addressed store, hash-verified

183
184// Applies the patch to the RDF graph
185function applyPatch (patchObject, graph, url) {
186 debug('PATCH -- Applying patch')
187 return new Promise((resolve, reject) =>
188 graph.applyPatch(patchObject, graph.sym(url), (err) => {
189 if (err) {
190 const message = err.message || err // returns string at the moment
191 debug(`PATCH -- FAILED. Returning 409. Message: '${message}'`)
192 return reject(error(409, `The patch could not be applied. ${message}`))
193 }
194 resolve(graph)
195 })
196 )
197}
198
199// Writes the RDF graph to the given resource
200function writeGraph (graph, resource, root, serverUri) {

Callers 1

patchHandlerFunction · 0.85

Calls 1

applyPatchMethod · 0.80

Tested by

no test coverage detected