Comunica query engine support for the LDflex language
Clone or download

Comunica for LDflex

This library lets you use the Comunica query engine with the LDflex language.

npm version Build Status Dependency Status


npm install ldflex ldflex-comunica


const { PathFactory } = require('ldflex');
const { default: ComunicaEngine } = require('ldflex-comunica');

// The JSON-LD context for resolving properties
const context = {
  "@context": {
    "@vocab": "",
    "friends": "knows",
// The query engine and its source
const queryEngine = new ComunicaEngine('');
// The object that can create new paths
const paths = new PathFactory({ context, queryEngine });

async function showPerson(person) {
  console.log(`This person is ${await}`);

  console.log(`${await person.givenName} is friends with:`);
  for await (const name of person.friends.givenName)
    console.log(`- ${name}`);

const ruben = paths.create({ subject: '' });


©2018–present Ruben Verborgh, MIT License.