beeldengeluid / comunica-web-client

A Web-based client to query the Web of Linked Data, using SPARQL or GraphQL-LD, powered by Comunica.

Home Page:https://comunica-web-client.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comunica-web-client

A Web-based client to query the Web of Linked Data, using SPARQL or GraphQL-LD, powered by Comunica.

This repo simply includes @comunica/web-client-generator as a dependency and calls it in a build script to generate a static site containing the web client.

A curated set of example queries is included in the /queries folder.

Local usage

install dependency:

npm install

generate the web client

npm run build

serve the generated web client in the build directory using your tool of choice, e.g. serve, python 3's http.server:

serve ./build/
python -m http.server -d ./build/

Adding Datasources

In settings.json, add to the datasources array:

"datasources": [
  {
    "name": "NISV SPARQL",
    "url": "https://cat.apis.beeldengeluid.nl/sparql"
  }
]

Adding Queries

In the /queries directory, add a .sparql file containing:

  • On the first line: '# ' + Title of the query to display in the dropdown
  • On the second line: '# Datasource: ' + URL to the associated Datasource (if any)
  • A valid SPARQL query

See for example children-of-program.sparql.

About

A Web-based client to query the Web of Linked Data, using SPARQL or GraphQL-LD, powered by Comunica.

https://comunica-web-client.vercel.app/