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.
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 thehttp://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 onAPIQuery.ResultResourcesReader
, which strips blank nodes from its result set. Subsequently thefetchDescriptionOfAllResources
method onAPIQuery
compares the number of remaining nodes to the original_pageSize
that was requested and determines that the result set is complete. ThecreateMetadata
method onAPIEndpointImpl
infers that since the result set is complete, thenext
property should be omitted.We can replicate this issue in
elda-standalone
by adding (for example) a blank node whose type isegc:BoardGame
to theexample-data.ttl
data set, and then querying theagain/games
endpoint.Related to https://github.com/epimorphics/elda/issues/63 , perhaps they should be fixed at the same time.