You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the path override for increasing the JSON:API page limit, the next paging link is not correct.
Examples
/* services.yml */
next_jsonapi.size_max: 100
Let's say we have more than 100 resources that need to be fetched. The goal is to be able to grab them all by fetching the first page and then recursively looking at the next link on the result and gluing all the pages together until no next link is found. This process might seem to negate the need for the path/page-limit override in the first place, but, in the case where there are thousands of resources, it would be nice to be able to fetch pages of larger size to limit the number of requests.
Note:first and prev links are missing but next link is populated and looks correct. However, see below for what happens when you follow that next link.
With path override and paging variables (fetch subsequent page - BROKEN)
Note: Again, first and prev links are missing. More importantly, the next link is the same as the self link. This will create infinite recursion when trying to glue the pages together. Also, when looking at the actual data (omitted), it appears to be the same as the original page (i.e. the page[offset] does not seem to have any effect).
The text was updated successfully, but these errors were encountered:
Problem
When using the
path
override for increasing the JSON:API page limit, thenext
paging link is not correct.Examples
Let's say we have more than 100 resources that need to be fetched. The goal is to be able to grab them all by fetching the first page and then recursively looking at the
next
link on the result and gluing all the pages together until nonext
link is found. This process might seem to negate the need for thepath
/page-limit override in the first place, but, in the case where there are thousands of resources, it would be nice to be able to fetch pages of larger size to limit the number of requests.Without
path
override (works as expected)Request:
/jsonapi/node/news_story?page[offset]=50&page[limit]=50
Response (links only):
With
path
override but no paging parameters (fetch first page - kind of works as expected)Request
/jsonapi/node/news_story?fields[node--news_story]=path
Response (links only)
first
andprev
links are missing butnext
link is populated and looks correct. However, see below for what happens when you follow thatnext
link.With
path
override and paging variables (fetch subsequent page - BROKEN)Request
/jsonapi/node/news_story?fields[node--news_story]=path&page[offset]=100&page[limit]=100
Response (links only)
first
andprev
links are missing. More importantly, thenext
link is the same as theself
link. This will create infinite recursion when trying to glue the pages together. Also, when looking at the actual data (omitted), it appears to be the same as the original page (i.e. thepage[offset]
does not seem to have any effect).The text was updated successfully, but these errors were encountered: