Context:
I have frontend and backend application. On frontend I have react + relay(graphQL), on backend Golang + gin and lib for graphQL. I created Table component in React to show data from one of the table from DB. I implemented pagination and so far everything is ok in that case. But user want to download all data (without pagination) as CSV file with structure of that table. Few weeks ago for solve this problem I use query without pagination option to fetch all data. That solution worked till now. In DB now is too much data and when I try to download it via website, or if I try to use curl, in both situation I have got connection reset by peer
.
My endpoint POST /data
in body I send query with variables.
Question:
What options I have? The best, for me, solution would be to reuse code I have. What should I do?
EDIT
I have decided to use stream
I lost support for graphQL (I do not know how to handle it yet) and my endpoint is not generic, can handle only the specific data, but works :P