sparql-engine
sparql-engine copied to clipboard
Documentation / help on how to use in the browser
Is your feature request related to a problem? Please describe.
It's not related to a problem, but I would like documentation or examples on how to use sparql-engine + N3.js in the browser.
Describe the solution you'd like
A documentatio/example HTML page that demonstrates how to :
- Init an N3 storage + sparql-engine on top of that
- Load an RDF file from a URL in the N3 storage
- Executes a SPARQL query
- Shows the necessary Javascript files to do that (from a CDN ? needs to be compiled locally ?)
Describe alternatives you've considered
Additional context
My goal is to use a local SPARQL-compliant triplestore to execute SPARQL queries built with Sparnatural : https://github.com/sparna-git/Sparnatural
ccing @dwhitney As I read in another issue you are caching local data in the browser, so maybe you could share an example ?
Thanks for your help !
@Callidon I was wondering if you help with this issue ? My first attempt at compiling the beast are a failure, I tried
npm install
npm run build
But got a bunch of errors like these:
node_modules/@types/lodash/common/object.d.ts:2429:67 - error TS1005: ';' expected.
2429 * This method is like `_.update` except that it accepts `customizer` which is
~~~~~~~~~~
node_modules/@types/lodash/common/object.d.ts:2430:47 - error TS1005: ';' expected.
2430 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
@tfrancart I managed to get it working. Check my fork here https://lucafabbian.github.io/sparql-engine/browser/example.html
Thanks @lucafabbian ! I grabbed the sparqlEngine.js from your deployment as I am still not able to compile. And for the moment it seems to do the trick, so thanks !