question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pagination in custom Action based on repository result

See original GitHub issue

Hi.

I have my custom action to get data based on repository. I want to use api-platform pagination, how to do that. Now repository gives me all results.

public function getSomeData(){
    $em = $this->getEntityManager();
    $queryBuilder = $em->createQueryBuilder();
    ....
    return $queryBuilder->getQuery()->getResult();

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
A-Marwancommented, Jul 9, 2018

Using the PaginationExtension or returning a doctrine paginator does not return hydra:view for me, any idea how to handle this?

0reactions
alanpoulaincommented, Mar 1, 2021

Please open another issue for the hydra:view key.

Read more comments on GitHub >

github_iconTop Results From Across the Web

symfony - Paginator with ApiPlatform on custom repository
Edit: I made a repo showing how to use api platform on raw data (with a csv file) and how filter it, sort...
Read more >
Pagination guidelines - GitLab Docs
Offset-based pagination is the easiest way to paginate over records, however, it does not scale well for large database tables.
Read more >
Paginate search source results
If adding pagination to a simple search source, set Paginate results on the search source record to true. However, if adding pagination to ......
Read more >
How to Build a Custom Pagination Component in React
totalCount: represents the total count of data available from the source. · currentPage: represents the current active page. · pageSize: ...
Read more >
Paging in ASP.NET Core Web API - Code Maze
Paging refers to getting partial results from an API. ... FindAll() method is just a method from a Base Repository class that return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found