Skip to content
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

Fractal include pagination help! #440

Open
josh9060 opened this issue Mar 7, 2018 · 7 comments
Open

Fractal include pagination help! #440

josh9060 opened this issue Mar 7, 2018 · 7 comments
Labels

Comments

@josh9060
Copy link

josh9060 commented Mar 7, 2018

Hi all,

I am using Laravel Fractal with one of my API's (a wrapper around this package).

I have a Thread that has many Replies and I want to paginate the Replies. The Replies are an include on the Thread Transformer.

How would I go about paginating a transformers include? Is it possible?

Thanks in advance!

@catalinux
Copy link

What serializer are you using?

JsonAPI has a link for each relationship and you can do paging for them:

http://jsonapi.org/format/#fetching-relationships

@josh9060
Copy link
Author

josh9060 commented Mar 7, 2018

I am using Fractal's default serializer.

Is there any examples that are available?

@catalinux
Copy link

catalinux commented Mar 7, 2018 via email

@josh9060
Copy link
Author

josh9060 commented Mar 8, 2018

The documentation for the JsonApiSerializer says it does not support pagination? Is this a fault? Are there any other ways of implementing what I stated in my first question?

@josh9060
Copy link
Author

I had a blank moment when writing this issue.

My solution was to have a separate endpoint that got the Replies associated to that Thread, paginated.

@johannesschobel
Copy link
Contributor

can you close this issue, if it is resolved? @Joshgallagher

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants