zazuko / query-rdf-data-cube

Explore or query RDF Data Cubes with a JavaScript API, without writing SPARQL.
https://zazuko.github.io/query-rdf-data-cube/
9 stars 2 forks source link

Inherit Sparql Fetcher from EntryPoint #52

Closed jstcki closed 4 years ago

jstcki commented 4 years ago

DataCube and Query should inherit the SparqlFetcher from the EntryPoint, since this is the only place to specify the fetcher options. I don't think there's a benefit to creating one fetcher per cube/query instance, so they just reuse the same one.

I also removed the bit that clones the options on each request, since I don't think it's necessary and may even be bad when a custom HTTP agent is used (which is necessary to make this work with a proxy – which is why I discovered this bug in the first place).

I wrote it in a way that changes the minimal amount of code but haven't fixed the fromJSON methods (fetcherOptions were not serialized anyway).

jstcki commented 4 years ago

Oh no, I just realized that I did my changes based on an old version of the library! Will rebase …

jstcki commented 4 years ago

Hmm, tests are still failing but I believe for unrelated reasons 🤔

Edit: ah, no this just happens just in my own Travis because I don't have coveralls set up (I believe)