Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
simonoakesepimorphics opened this issue Jul 30, 2018 · 0 comments
Open

Comments

@simonoakesepimorphics
Copy link
Contributor

simonoakesepimorphics commented Jul 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant