Is there a way to convert GraphQL queries in a Java server to SPARQL queries?

405 views Asked by At

I have an AllegroGraph database which stores RDF data. The only way to retrieve these data is through SPARQL queries. The external API I have is GraphQL (it will be in Java server). Is there a way that I can connect GraphQL Java server to AllegroGraph database and run SPARQL queries (possibly transforming GraphQL query to SPARQL)?

1

There are 1 answers

0
Stanislav Kralin On

I'd propose to wrap your SPARQL endpoint with HyperGraphQL and then use GraphQL federation or GraphQL schema stitching. There are Java libraries for both.

As an alternative to installing HyperGraphQL, you could replace AllegroGraph with Ontotext Platform or Stardog which provide GraphQL access to RDF out of the box.