Ensure works with JSONAPI pagination requirements
See original GitHub issueI’m a bit new to JSONAPI, but it looks like the meta
key goes away and becomes the links
key. I tried the new JSONAPIAdapter and doesn’t look like this addon plays well with it. Perhaps we can first make the response format overridable, to make the user handle the links
key themselves and transform it into something we expect. We could also sniff the adapter and try to pick the response format automatically.
Comments welcome because this is just the beginning of my thoughts.
Issue Analytics
- State:
- Created 8 years ago
- Comments:34 (9 by maintainers)
Top Results From Across the Web
“Cursor Pagination” Profile - JSON:API
On any valid paginated request, the number of pagination items returned MUST equal the used page size — provided there are at least...
Read more >Support paging · Issue #236 · json-api/json-api - GitHub
We can make mandatory the addition of the hash of the body to the URL: if a request come with an -incorrect hash...
Read more >JSONAPI Elixir — jsonapi v1.4.0 - HexDocs
JSONAPI.Deserializer is a plug designed to make a JSON:API resource object more convenient to work with when creating or updating resources. This plug...
Read more >Pagination - Laravel JSON API
JSON API designates that the page query parameter is reserved for paging parameters. However, the spec is agnostic as to how the server...
Read more >Pagination in Ember with a JSON API Backend
Consuming the paginated API. Let's assume we have a working backend. If you don't have a compliant backend, here is a quick Rails...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got this working in our implementation. We have a rails backend using jsonapi-resources and the ‘Paged Paginator’.
The only gotcha in our implementation was that we did not expose the total pages count to the client, probably a similar issue to what @allthesignals was having. Ember Inifinity would only request one page, or keep requesting pages until I would kill the ember server. We had to explicitly allow the page count in the meta field like so: top_level_meta_include_page_count
The ember route looks like so:
works great! good job Ember Infinity team. Since jsonapi seems to the the preferred format for ember and the default for ember-data, I think something alluding to this should be in the readme. My opinion.
I see It can work with jsonapi pagination.
total pages was calculated and sent with the metadata as
And it works smooth