Skip to content

Create dedicated simplifySparqlResultsOneVariable function #114

@EdJoPaTo

Description

@EdJoPaTo

Currently simplifySparqlResults(sparqlResults, {minimize: bool}) exists.

The problem here is that the minimize argument only works when the query returns exactly one variable. If that's not the case the minimize argument is ignored.

if (vars.length === 1 && options.minimize === true) {

This means that the return type is not clear at compile time and only at runtime. Therefore TypeScript can not help much here. This could be more strict with either an error in case of more than one variable or (better in my opinion) a dedicated function for this.

This will be breaking either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions