GraphQL (instead of REST) support for Grakn Core / Graql linked to GraphQL - to use JavaScript Frontends / Webservices


#1

I wonder if there will be support for GraphQL ? or will the Frontends such as:

Graph-Visualization:
http://graphalchemist.github.io/Alchemy/#/
http://www.cytoscape.org/


be supported natively?

Plus in the sense of microservices in the Frontend -> Node.JS and https://www.prisma.io/ ->
(there I am hoping that Grakn.ai will have a tutorial/ native support soon ) could be a nice combination.
Of course could also be React + Apollo (check https://www.howtographql.com/ for further details)

Here the matching image (edited to visualize my question / concept from https://www.prisma.io/):

My dream combination would be that Graql and GraphQL are mapped so there is just no difference in using them.
Any thoughts on that?


#2

Hi @ott.lukas.14, we don’t have any such plans for now, as it’s not possible to map Graql and GraphQL symmetrically and generically. Graql contains more expressive constructs that languages like GraqphQL doesn’t. Although mapping Graql to GraphQL would be possible, it will result in a more verbose GraphQL structure. And given that GraphQL only contains more primitive data structures, Mapping GraphQL to Graql would mean you don’t use the full expressivity of Graql, as GraphQL could not represent the Graql constructs.

However, there’s nothing stopping you from creating your own GraphQL converter, but it would be a very specific application for your own use case.


#3

Thank you for the answer. this is why i put on my concept Grakn Core not directly to GraphQL - instead I showed a linkage to Prisma.io which obviously seems to make more sense as Graql is closer to RDFS and Linked Open Data than just a query language for evolving REST services :slight_smile: