It would be nice to be able to get the mermaid diagram string for any SPARQL query from client-side apps (e.g the sparql-editor, or have a VSCode extension for that)
So that we can easily visualize any SPARQL query without the need to install java locally
I would see a few ways to solve this:
Deploy a small web server with a endpoint that takes a SPARQL query string and returns the mermaid string. Fastest to implement, but requires to deploy the service somewhere and requires client to have internet access
Reimplement the mermaid generation function in JavaScript using sparqljs parser. Might take some time to implement, will need to be improved/maintained in parallel to the java lib, but would make it really easy to use on client
Find a way to compile the mermaid generation function to WebAssembly (e.g. with https://github.com/konsoletyper/teavm). Might be a bit tricky to implement, and will probably be quite big in size for client-side app
After discussions it might be interesting to not go for mermaid, and look into a visualization system that would also allow to edit the nodes. Maybe look into gephi-lite/sigma.js
It would be nice to be able to get the mermaid diagram string for any SPARQL query from client-side apps (e.g the sparql-editor, or have a VSCode extension for that)
So that we can easily visualize any SPARQL query without the need to install java locally
I would see a few ways to solve this: