Re: Welcome to the community group on Bridging GraphQL and RDF

Hi All,

I am a developer at TopQuadrant where I have helped design and implement 
various incarnations of the TopBraid product line. TopBraid can be 
regarded as a generic editing platform for RDF-based instance data, 
ontologies and shapes, and then offers various mechanisms to process and 
query the resulting RDF-based data. We have traditionally focused on 
SPARQL and built a stack of languages on top of SPARQL to enable our 
customers and ourselves to more easily work with RDF data. Among others 
this lead to SPIN which later became inspiration to SHACL. Once we had 
SHACL, and GraphQL became popular, it became a fairly obvious choice for 
us to use SHACL as the glue between the RDF world and the GraphQL schema 
mapping. This work, which seems to have become a successful selling 
point of our product line, is described here:

https://www.topquadrant.com/technology/graphql/

The web-based TopBraid EDG product now increasingly uses GraphQL for its 
own client-server communication, and we believe many customers prefer 
GraphQL to get data out of TopBraid installations. I guess that's mostly 
because GraphQL is easier to learn than SPARQL, and because GraphQL 
exposes JSON tree structures and not just flat tabular structures like 
SPARQL. On the downside, GraphQL is schema-first while SPARQL offers 
more flexibility. So in practice we pick GraphQL where it makes sense 
while falling back to SPARQL for the more difficult bits.

SHACL describes a structure of RDF nodes and (through references between 
shapes) even tree structures. Furthermore SHACL allows to define 
multiple views on the same data, relatively independent of the physical 
structure of the data. For example, path expressions and sh:values rules 
can be used to step from one node in the graph to other nodes that may 
be some steps away. Finally, all of our data models already have SHACL 
shapes, and those shapes have been used to define the "layout" of view 
forms. So using SHACL as the foundation of GraphQL meant that every 
"ontology" in TopBraid systems already exposed a default JSON API.

There would be a lot to describe here and I'd be happy to answer 
questions on details here on this forum. Or maybe it would make sense 
for existing implementers to give an introductory presentation (assuming 
we can figure out a reasonable time slot, I am in Australia...).

In terms of this CG, our goals and situation may be different from other 
list members, in that we already have an established solution in 
production. One implication of this, to be very honest, may be that we'd 
be less excited about going into a completely different direction if 
that breaks our existing solution and customer installations. It just 
already seems to work well, and we are not in a research lab where we 
could make random changes between versions. Having said this, I don't 
think there is only one possible mapping between RDF and GraphQL, so if 
this CG produces a new "engine" then we may integrate this into our 
product as an alternative. And I'd be very interested to learn if 
someone (or we as a community) can come up with incremental improvements.

Regards
Holger


On 14/02/2020 01:14, Ruben Taelman wrote:
> Dear all,
>
> Welcome to the community group on Bridging GraphQL and RDF!
>
> As you probably already know,
> this group has been setup to explore combinations of GraphQL and RDF,
> and to investigate how these two domains can help each other.
>
> Before we start with defining the concrete goals of this group,
> selecting a chair, and defining the process that will be followed,
> I suggest that everyone first introduces themselves,
> and shares with the group what you would like to see as an outcome.
>
> Let me start off:
>
> I am a (finishing) PhD student at Ghent University, Belgium.
> My research focuses on publishing and querying Linked Data on the Web.
>
> During my research, I have experienced the difficulty developers have 
> with writing SPARQL queries.
> Since GraphQL is much more popular among developers, I tried to lift 
> GraphQL queries to the RDF domain,
> so that they can be used as an alternative to SPARQL queries.
> This mechanism resulted in GraphQL-LD [1, 2], which combines GraphQL 
> queries with JSON-LD contexts.
>
> During my work on GraphQL-LD, I quickly noticed that several other 
> companies had similar ideas.
> Last year, I started working on a high-level comparison [3, 4] between 
> the approaches that existed back then.
> Note that several new related approaches have been introduced, so my 
> comparison is a bit outdated.
> As several people (including myself) recognised the need for some kind 
> of alignment between these different approaches,
> I created this community group as an attempt to bring all interested 
> parties together.
>
> As an end-goal (possibly as a step *after* this CG),
> I would like to see some kind of standardization on how GraphQL maps 
> to RDF.
> Given my interest in querying, I would at least like to see this from 
> a querying perspective,
> so I want some kind of mapping from GraphQL queries to SPARQL queries 
> (or something more generic).
> I understand that other people in this group are interested in other 
> (non-querying) aspects of GraphQL,
> and I definitely agree that work should be done for these things as well.
>
> [1] https://comunica.github.io/Article-ISWC2018-Demo-GraphQlLD/
> [2] https://github.com/rubensworks/graphql-ld.js
> [3] https://rubensworks.github.io/article-w3cdataws2019-graphql/
> [4] https://www.rubensworks.net/raw/slides/2019/w3c-data-ws-graphql-rdf/
>
> Kind regards,
> Ruben Taelman

Received on Sunday, 16 February 2020 22:38:29 UTC