All Projects → dan-f → twinql

dan-f / twinql

Licence: MIT license
A graph query language for the semantic web

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to twinql

Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (+605.88%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld, query-language
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 112 (+558.82%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld, query-language
Pyld
JSON-LD processor written in Python
Stars: ✭ 413 (+2329.41%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
Rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
Stars: ✭ 1,584 (+9217.65%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
Jsonld.js
A JSON-LD Processor and API implementation in JavaScript
Stars: ✭ 1,212 (+7029.41%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
titanium-json-ld
A JSON-LD 1.1 Processor & API
Stars: ✭ 79 (+364.71%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
Php Json Ld
PHP implementation of a JSON-LD Processor and API
Stars: ✭ 246 (+1347.06%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
YALC
🕸 YALC: Yet Another LOD Cloud (registry of Linked Open Datasets).
Stars: ✭ 14 (-17.65%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
jsonld-context-parser.js
Parses JSON-LD contexts
Stars: ✭ 20 (+17.65%)
Mutual labels:  linked-data, rdf, semantic-web, json-ld
Processor
Ontology-driven Linked Data processor and server for SPARQL backends. Apache License.
Stars: ✭ 54 (+217.65%)
Mutual labels:  linked-data, rdf, semantic-web
Rdf Ext
RDF library for NodeJS and the Browsers
Stars: ✭ 97 (+470.59%)
Mutual labels:  linked-data, rdf, json-ld
Web Client
Generic Linked Data browser and UX component framework. Apache license.
Stars: ✭ 105 (+517.65%)
Mutual labels:  linked-data, rdf, semantic-web
Limes
Link Discovery Framework for Metric Spaces.
Stars: ✭ 94 (+452.94%)
Mutual labels:  linked-data, rdf, semantic-web
Informationmodel
The Information Model of the International Data Spaces implements the IDS reference architecture as an extensible, machine readable and technology independent data model.
Stars: ✭ 27 (+58.82%)
Mutual labels:  linked-data, rdf, semantic-web
Dokieli
💡 dokieli is a clientside editor for decentralised article publishing, annotations and social interactions
Stars: ✭ 582 (+3323.53%)
Mutual labels:  linked-data, rdf, semantic-web
viziquer
Tool for Search in Structured Semantic Data
Stars: ✭ 12 (-29.41%)
Mutual labels:  linked-data, rdf, query-language
Grafter
Linked Data & RDF Manufacturing Tools in Clojure
Stars: ✭ 174 (+923.53%)
Mutual labels:  linked-data, rdf, semantic-web
ControlledVocabularyManager
Rails application with Blazegraph for managing controlled vocabularies in RDF.
Stars: ✭ 20 (+17.65%)
Mutual labels:  linked-data, rdf, json-ld
carml
A pretty sweet RML engine, for RDF.
Stars: ✭ 74 (+335.29%)
Mutual labels:  linked-data, rdf, semantic-web
Semanticmediawiki
🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+2011.76%)
Mutual labels:  linked-data, rdf, semantic-web

twinql

Build Status Coverage Status

A graph query language for the semantic web. Not SPARQL.

Use Cases

twinql was designed with the goal of scratching a particular itch: fetching linked data over LDP without having to imperatively follow every link and handle every error in an ad-hoc manner in Solid applications.

The main idea behind twinql is that queries select subgraphs by starting at a particular node and traversing outwards. The query and the response have a similar recursive tree structure so that the shape of the response can be inferred from the shape of the request.

It is currently a hobby project and quite limited in scope. It cannot do many of the things that SPARQL can. However, it attempts to be more ergonomic than SPARQL for common use cases.

Examples

Here's how you would query a WebID for profile data and data of that person's friends:

@prefix foaf http://xmlns.com/foaf/0.1/

https://dan-f.databox.me/profile/card#me {
  foaf:name
  foaf:img
  [ foaf:knows ] {
    foaf:name
    foaf:img
  }
}

Response:

{
  "@context": {
    "foaf": "http://xmlns.com/foaf/0.1/"
  },
  "@id": "https://dan-f.databox.me/profile/card#me",
  "foaf:name": { "@value": "Daniel Friedman" },
  "foaf:img": { "@value": "https://dan-f.databox.me/profile/me.jpg"},
  "foaf:knows": [
    {
      "@id": "https://deiu.me/profile#me",
      "foaf:name": {"@value": "Andrei Vlad Sambra" },
      "foaf:img": {"@value": "https://deiu.me/avatar.jpg" }
    },
    {
      /* ... */
    }
  ]
}

Goals

  • Be declarative
  • Work well with existing standards and tools
  • Make app-building easier
  • Support multiple persistence layers (in-memory, link following, SPARQL, etc)
  • Be implemented eventually on the server to improve performance when querying within a single domain and to reduce data being sent over the network

Known Challenges

  • Link-following is slow
  • Not all linked data actually links as well as it should
  • LDP doesn't care how much data you want from a particular graph; it gives you the whole thing
  • Just about no operation on the semantic web is atomic

Roadmap

  • ordering and pagination
  • response streaming
  • Mutation API

Other cool things

  • Create higher level tooling for offline-first querying and realtime updates
  • Create bindings for common UI libraries
    • e.g. connected React component

Development

This reference implementation of twinql happens to be built in JS for quick prototyping, but a safer language is recommended when implementing for a production use case.

Contributing

If you want to contribute to this reference implementation, first reach out by creating a Github Issue to make sure we're on the same page 😄

Assuming you want to mess with the code, just do the following:

  1. Make sure you have node >=7.x and npm installed.

  2. Clone the repo

$ git clone https://github.com/dan-f/twinql.git # (or your fork)
  1. Install the dependencies
$ cd twinql && npm install
  1. Run the demo site
$ npm start
  1. Build the lib
# You can run webpack in watch mode to rebuild the UMD bundle on file changes.
# This is useful when prototyping with the demo site.
$ npm run build:dev

# To test the minified UMD build:
$ npm run build:umd

# To transpile the library to CommonJS ES5
$ npm run build:lib
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].