Move SPARQL logic entirely to backend