2. HyperGraphQL = linked data + GraphQL
Linked Data:
- A set of specifications and good practices
developed and recommended by W3C for
publishing (connected) data on the Web.
- In a narrow sense, a graph data model (RDF)
based on the use of URIs for identifying
resources and describing them with
subject-predicate-object triples.
GraphQL:
- A query language for APIs and a runtime
environment for fulfilling data requests.
- Originally developed by Facebook and
released in 2015.
- Predicted one of the most promising web
development technologies for 2018.
3. Linked data
Pros:
- Very flexible and expressive open-world,
schema-on-read, graph data model.
- Accompanied by highly expressive query
language SPARQL, along with a range of
other dedicated tools and standards (OWL,
SHACL, JSON-LD, RDFa).
Cons:
- The flexibility and the expressiveness of the
stack makes it sometimes demanding to
work with for developers (esp. front-end).
- Querying data from multiple sources
(federated querying) might easily get
complex and unreliable.
5. Objectives
- hiding the complexities of the Semantic Web
stack behind GraphQL interface
- enforcing a uniform, strict view over
heterogeneous linked data sources residing
in disconnected services
- restricting access to RDF stores down to
simple yet expressive (tree-shaped) GraphQL
queries
- facilitating construction of
microservice-based linked data
architectures in a “plug-and-play” fashion
11. Querying SPARQL endpoint
Live demo (http://bit.ly/2Dd8rVa)
- Queries are rewritten to SPARQL and
delegated to the remote endpoint, from where
the relevant portion of data is fetched.
- Configuration:
{
"id": "dbpedia-sparql",
"type": "SPARQLEndpointService",
"url": "http://dbpedia.org/sparql/",
"graph": "http://dbpedia.org",
"user": "",
"password": ""
}
12. Exposing data from local file
Live demo (http://bit.ly/2DdeKIq)
- Queries are rewritten to SPARQL and
executed at the local in-memory triple store
where the RDF data from the file resides.
- Configuration:
{
"id": "agrovoc-local",
"type": "LocalModelSPARQLService",
"filepath": "agrovoc.ttl",
"filetype": "TTL"
}
13. Federated querying
Live demo (http://bit.ly/2mx04si)
- Query is partitioned into largest possible
subqueries that can be handled via single
request by each individual service within the
federation.
- Whenever possible such subqueries are
executed concurrently.
14. Summary & outlook
- HyperGraphQL is a lightweight, extensible
GraphQL query interface for linked data
services.
- Currently, it supports access to and
federation of SPARQL endpoints, local RDF
data, other HyperGraphQL endpoints.
- Setting up an instance requires providing a
simple configuration and a schema.
- Schema must be defined manually, but could
be automated under certain data modelling
assumptions.
- It supports a number of response formats,
including JSON-LD, RDF/XML, TURTLE,
N-TRIPLE.
Docs / demo / tutorial: http://hypergraphql.org
Twitter: @HyperGraphQL