Blazegraph JavaScript API.
npm install blazegraph --save
Many (undocumented yet) methods are available. Have a look at the source for more info.
const {prepareBlazeUrl} = require('blazegraph')
const db = prepareBlazeUrl({
host: 'localhost',
port: 9999,
namespace: 'kb', // Those are the default values, passing no params yields the same result
});const {composeP} = require('ramda')
const {SELECT} = require('blazegraph')
composeP(
console.log, // An array of objects of the shape { subject, predicate, object, graph }
SELECT`select * { ?s ?p ?o } limit 10`,
)(db)const {composeP} = require('ramda')
const {readQuads} = require('blazegraph')
composeP(
console.log, // An array of objects of the shape { subject, predicate, object, graph }
readQuads({
predicate: '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>',
object: '<http://example.com/Person>',
})
)(db)const {composeP} = require('ramda')
const {SELECT, prepareBlazeUrl} = require('blazegraph')
composeP(
console.log,
SELECT`select * { ?s ?p ?o } limit 10`,
prepareBlazeUrl
)()Unstable, do not use in production! The current API is quite specific to Nelson, but feel free to PR breaking changes to make it universal.
Yes, thank you. Please lint, update/write tests and add your name to the package.json file before you PR.
Blazegraph-js is released under the MIT license.
Blazegraph is freely available under the GPLv2 open-source license.