Skip to content

On-demand pagination for toMany relations #1686

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

Closed
soyuka opened this issue Feb 8, 2018 · 2 comments
Closed

On-demand pagination for toMany relations #1686

soyuka opened this issue Feb 8, 2018 · 2 comments

Comments

@soyuka
Copy link
Member

soyuka commented Feb 8, 2018

There has been some demand on this particular feature.

Example:

Resource {
  name
  ChildResource[]
}

GET /api/resource

{
  name: 'foo',
  childResources: [1,2,3 ... 30 ] // paginated
}

I'm really not sure how / if we can pull this out but I'm opening this issue to keep track of ideas suggestions.

About the configuration we could use @ApiProperty(attributes={"paginate": true}) with maybe some more parameters to control that pagination?

We may also flag this as a "wontfix" and propose an alternative solution.

@teohhanhui
Copy link
Contributor

teohhanhui commented Apr 2, 2019

From #1083, it seems we need to allow greater control, at least the following should be supported:

  • IRI to subresource collection
  • IRI to subresource collection, but include total item count
  • full subresource collection, with IRI to subresources (already supported)
  • full subresource collection, with embedded subresources (already supported)
  • paginated subresource collection, with IRI to subresources
  • paginated subresource collection, with embedded subresources

@soyuka
Copy link
Member Author

soyuka commented Apr 7, 2019

superseeded by #2706

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

No branches or pull requests

2 participants