Release 2.3.0: Better timeout support and minor enhancements

Wednesday, June 29, 2022


On this page

    It's been a while since our latest blog post, so here's a small announcement on the latest 2.3.0 release.

    Better timeout support

    When doing queries over slow sources, it may sometimes be desired to have requests time out if they run for too long. As of this release, it is possible to configure such timeouts.

    For example, configuring a timeout of 60 seconds when querying over a TPF endpoint can be done as follows:

    const bindingsStream = await myEngine.queryBindings(`SELECT * WHERE { ?s ?p ?o }`, {
      sources: ['http://fragments.dbpedia.org/2015/en'],
      httpTimeout: 60_000,
    });
    

    This functionality was implemented by @Tpt, as the functionality was requested via a bounty.

    Union default graph

    By default, Comunica will only query over the default graph. If you want to query over triples in other named graphs, you need to specify this via the GRAPH, FROM, or FROM NAMED clauses. However, by setting the unionDefaultGraph context option to true, triples patterns will also apply to triples in the non-default graph.

    const bindingsStream = await myEngine.queryBindings(`SELECT * WHERE { ?s ?p ?o }`, {
      sources: ['https://fragments.dbpedia.org/2015/en'],
      unionDefaultGraph: true,
    });
    

    Improved ordering of terms

    We recently noticed that ordering of terms in Comunica (as used by ORDER BY), did not fully implement total ordering. This caused issues where certain terms would be ordered in an inconsistent manner. Thanks to @Tpt, Comunica (and the underlying Sparqlee expressions evaluator) now have proper total ordering support.

    Full changelog

    As always, if you want to learn more about these changes, check out the full changelog.