Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocument how pagination works #1666
Comments
|
I believe we're sending |
|
Yes, that is indeed the case: https://github.com/ory/hydra/blob/master/client/handler.go#L200-L206 Should probably document this somewhere :D |
|
@aeneasr I have seen the code also, but in fact, there is no Say I have 100 clients, and calling
I have no idea where I have to expose more Headers, now my config is just |
|
What I meant is that you can calculate the approximate number of items by taking last (in that case it would be about 500 items or "50 pages a 10 items"):
Does that help? |
|
If Hydra can ensure that every list request can return the last rel, I think it helps |
|
I am confused, I thought you always receive the last rel in the header, that's what you said here ( #1666 (comment) ), no? Is the header missing sometimes? And if so, when exactly? |
|
Like this, #1667, when the Before fixing the bug, I can only assume that, if lacking of |
|
Yes, no matter what the behavior is, I hope the feature could be freezed and documented as fast as we can |
|
As always, we happily accept any PRs that help with that - for implementing this within Ory it always depends on internal sprint and milestone planning. |
|
@nmlc sorry I missed your comment - your contribution would be very much welcomed! |


Is your feature request related to a problem? Please describe.
When querying the Clients/Consent Sessions using pagination, ORY Hydra will only return results with some links, but not the total count of the items, which is useful to display in the frontend, you know, showing the total pages or something.
Describe the solution you'd like
Add the
total_countparameter into Header.Although I think that the most elegant pagination solution is following JSON:API Spec, but I know it's almost impossible to change the data structure totally. So I think adding a parameter into Header is also a nice solution.