nestjsx / nestjs-typeorm-paginate

:page_with_curl: Pagination response object function + types for typeorm + nestjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to stream raw responses along with pagination?

averri opened this issue · comments

I would like to get paginated results and stream the response back in the controllers.
How to access the stream object?

I think this is a bit of a non-package specific request. It really depends on your resources. A simple method I would use is websockets to achieve this. Doing a sort of page by page query + publish to the socket.
A more sophisticated method would be the create a stream however I've not a lot of experience with streams so I wouldn't really be much help! But I reckon the method of delivery would be similar or the same

Sorry just seen there's a stream method on typeorm but not quite sure how to implement it with pagination?