kopflos icon indicating copy to clipboard operation
kopflos copied to clipboard

Add option to wire up own loaders

Open tpluscode opened this issue 6 years ago • 0 comments

Currently the rdf-loaders are internal to the middleware. It should be possible to attach custom loaders. Something like an optional callback with the registry as parameter:

const myLoader = require('my-loader')

hydraBox.fromUrl('...', {
  registerLoaders: (registry) => {
    registry.registerNodeLoader('http://my/type', myLoader)
  }
})

tpluscode avatar Aug 07 '19 10:08 tpluscode