Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mappings between shape languages #64

Open
VladimirAlexiev opened this issue Mar 30, 2019 · 13 comments
Open

Mappings between shape languages #64

VladimirAlexiev opened this issue Mar 30, 2019 · 13 comments
Labels
Category: related standards For RDF-related standards

Comments

@VladimirAlexiev
Copy link

Shapes are important to describe business objects (entities) in RDF, see #63.
There are several shape or shape-like languages:

  • SHACL
  • ShEx
  • JSONLD Frames
  • GraphQL

Note: there are other RDF Shape languages (eg OSLC Shapes and DCAP profiles) but they were sort of subsubmed during the Shapes WG effort, and the outcome was SHACL and ShEx.

Each of these shape languages has its adherents and users, each has some strengths and weaknesses. It will be very useful for the community if some conceptual or technical mappings were created between the shape languages. This can help efforts such as:

  • using shapes in one language to generate artefacts in another language, thus serving a different set of APIs and another user population. Eg from SHACL to JSONLD Frames
  • converting shape libraries between languages
  • generating shapes from editing tools or simpler representations
  • shape visualizations

By no means am I claiming that shape languages are equivalent or have the same strength, or that lossless mappings are possible in all cases. This is not meant to spark a religious war.
Exploring the detailed correspondences between these technologies can be very interesting and fruitful. Not least because it can suggest extensions to some of the languages.

There are multi-shape implementations (Shaclex) that I believe have a lot to contribute to this discussion.

cc @HolgerKnublauch @ericprud @jimkont @labra @azaroth42 @gkellogg @msporny

@draggett
Copy link
Member

For completeness, you can add SHRL to the list of RDF shape languages. SHRL is based upon Augmented Transition Networks (ATNs) which were developed in the 1970's as a graphical representation of natural language grammars. SHRL rules are expressed directly in RDF. See:
https://www.w3.org/WoT/demos/shrl/test.html and https://www.w3.org/WoT/demos/shrl/shape%20rule%20language.pdf

@dbooth-boston
Copy link
Collaborator

This is closely related to issue #27, Lack of a standard rules language, because rules can be used to map between shapes (a/k/a data models).

@VladimirAlexiev
Copy link
Author

https://www.w3.org/Data/events/data-ws-2019/assets/position/Ruben%20Taelman.pdf compares briefly 4 integrations of RDF and SHACL (half a page for each). By @rubensworks

@VladimirAlexiev
Copy link
Author

Jem Rayfield (semantic architect at Ontotext) asked: GraphQL +RDF directive harmonisation anyone? Seems to be various directives floating around @graph @uri @prefix @filter _@href @service etc.. Implementing GraphQL at Ontotext..would like some standards... Pointers to standards/working groups appreciated.

@gkellogg
Copy link
Member

You might look at GraphQL-LD.

cc/@rubensworks

@HolgerKnublauch
Copy link

I don't think there is a standard or working group on this harmonisation ATM. The mapping that we use is described in https://www.topquadrant.com/technology/graphql/

@rubensworks
Copy link
Member

@VladimirAlexiev As far as I know, no collaborative efforts exist for this yet, but I would be very interested in setting this up.

@VladimirAlexiev
Copy link
Author

@jemrayfield

@VladimirAlexiev
Copy link
Author

@HolgerKnublauch @ericprud @jimkont @labra @azaroth42 @gkellogg @msporny: please comment on https://docs.google.com/document/d/1unO7s2cTk0OqZIAj2iN_6ghcqJc0nT8A8NB3mLg-WLk/edit "input to the creation of a W3C community group that focuses on analyzing methods for accessing RDF data using GraphQL queries" by @rubensworks. In its second half I've proposed to include this issue in the CG scope.

@lonniev
Copy link

lonniev commented Aug 23, 2020

Is the community making progress in forming - since the January 2020 update above?

@lonniev
Copy link

lonniev commented Aug 23, 2020

@VladimirAlexiev asks about federated GraphQL mutations. Is there support in Apollo for distributed transactions with all-or-none commitments? When transforming shapes, an issue is that the composition hierarchy may differ between the various shape languages and modification updates stated in GraphQL (or in any interface language) might involve multiple updates to multiple repositories where all updates must commit or none are allowed to commit. I think of it as “transactional distributed schematic ontological transformation”. (I’m going to go read more about Apollo; it’s new to me.)

@namedgraph
Copy link

The obvious solution for mappings is SPARQL CONSTRUCT. I don't get how you can suggest GraphQL without even mentioning SPARQL.

@SemanticBeeng
Copy link

SemanticBeeng commented Dec 15, 2020

Each of these shape languages has its adherents and users, each has some strengths and weaknesses. It will be very useful for the community if some conceptual or technical mappings were created between the shape languages.

+1 for the use case / application of building data catalogs / asset catalogs / feature registryes and technology independent data APIs / #DAPI

TopQuandrant has an interesting extension to GraphQL and mapping to SHACL: "GraphQL Schemas to RDF/SHACL"
Some highlights here and here
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: related standards For RDF-related standards
Projects
None yet
Development

No branches or pull requests

9 participants