Skip to content

Pagination does not work when blank nodes are in result set #214

@simonoakesepimorphics

Description

@simonoakesepimorphics

When the _pageSize query parameter is set on a request, if the range of selected nodes contains a blank node, it will not be returned in the result graph (intended). However, in this case the http://www.w3.org/1999/xhtml/vocab#next property is not set on the page resource, even if there are more results in the data set. As a result, the UI does not render the "next page" link, and consumers of the API are not able to determine whether they can query again for more results.

This seems to be caused by the consume method on APIQuery.ResultResourcesReader, which strips blank nodes from its result set. Subsequently the fetchDescriptionOfAllResources method on APIQuery compares the number of remaining nodes to the original _pageSize that was requested and determines that the result set is complete. The createMetadata method on APIEndpointImpl infers that since the result set is complete, the next property should be omitted.

We can replicate this issue in elda-standalone by adding (for example) a blank node whose type is egc:BoardGame to the example-data.ttl data set, and then querying the again/games endpoint.

Related to #63 , perhaps they should be fixed at the same time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions