1

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

Nju
  • 579
  • 1
  • 8
  • 18
  • Without knowing what is resetting the connection and why nobody can help you. Check logs and maybe increase logging on your server and any networking gateways/firewalls between your client and it. – Richard Huxton Jun 14 '23 at 06:10
  • @RichardHuxton I use Opentelemetry to metric. I have add it to all endpoints, db operation. Only what I have in log is `connection reset by peer` :( The problem occurred on cloud and locally – Nju Jun 14 '23 at 07:29

0 Answers0