Home

Awesome

<div align="center"> <h1>@databorg/client</h1> <br /> <strong> Highly versatile SPARQL client for modern age </strong> </div>

Features

While SPARQL is an great language, client libraries today typically come with a limited set of features and offload the additional work to developers who are using them.
We aim to create a more powerful and developer-friendly out-of-the-box experience instead.

Installation

npm install @databorg/client

Basic usage

import { DataborgClient, url } from '@databorg/client';

// create new client
const client = new DataborgClient({
  queryEndpoint: 'https://dbpedia.org/sparql',
});

// execute a query
const result = await client.query({
  query: `SELECT ?p ?o WHERE { ?uri ?p ?label } LIMIT 5`,
  variables: {
    uri: url`http://dbpedia.org/ontology/deathDate`,
    label: 'Hello world!',
  },
});

// execute an update
const result = await client.update({
  query: `INSERT DATA { var:uri a dbpedia:Resource . }`,
  variables: { uri: url`http://dbpedia.org/Test` },
});

Documentation

The documentation contains everything you need to know about @databorg/client:

License

Licensed under MIT.