jeff-zucker / sparql-fiddle

a JavaScript SPARQL API and online fiddle
MIT License
18 stars 7 forks source link

Error: $rdf is not defined #3

Closed renyuneyun closed 9 months ago

renyuneyun commented 1 year ago

I'm trying to use this app to perform SPARQL query against a Solid resource. I typed my resource URI, and entered the SPARQL query text. Hitting "run" did not work. Then I copied the resource content (Turtle). Hitting "run" also did not work. Opening the console gives me this error (repeatedly):

ReferenceError: $rdf is not defined
    run https://jeff-zucker.github.io/sparql-fiddle/sparql-fiddle.js:199
    run https://jeff-zucker.github.io/sparql-fiddle/sparql-fiddle.js:197
    run https://jeff-zucker.github.io/sparql-fiddle/:125
    onclick https://jeff-zucker.github.io/sparql-fiddle/:1
[sparql-fiddle:127:27](https://jeff-zucker.github.io/sparql-fiddle/)
jeff-zucker commented 1 year ago

Sorry, @renyuneyun this library is quite stale and I have not had time to update it. You have spurred me to act, though. I will be releasing an entirely new version of the library soon. Chances are , you can resolve that particular issue by importing rdflib in a script prior to importing sparql-fiddle.

renyuneyun commented 1 year ago

Thanks, Jeff. I'll try that. It's really interesting that this is the only app I found that allows to test SPARQL queries for Solid resources... Of course building my own app would be an option, but it's not as convenient...

jeff-zucker commented 1 year ago

@renyuneyun - I have a new improved SPARQL access library that allows you to choose either rdflib or comunica and supports replaceable query parameters. Please check out the sol-sparql web component and let me know what you think.