I have a problem, when queying data that is used to build a CSV file.
The query takes for 1000+ elements, around 600ms for the subgraph to complete, but the time for the Apollo Router, to receive this information back, is for 500 elements around 15 seconds, and 1000+ elements its around 30 seconds.
Output
Node.js GraphQL model:
More than 25 fields, and 4 objects, that also contains quite a few fields:
(small sample)
Describe the bug
I have a problem, when queying data that is used to build a CSV file. The query takes for 1000+ elements, around 600ms for the subgraph to complete, but the time for the Apollo Router, to receive this information back, is for 500 elements around 15 seconds, and 1000+ elements its around 30 seconds.
Output
Node.js GraphQL model: More than 25 fields, and 4 objects, that also contains quite a few fields: (small sample)
Resolver:
Test for 1220 elements (340 ms for service to complete)
Fetch call receive by Router: {"timestamp":"2024-10-04T12:33:37.229346071Z","level":"DEBUG","trace_id":"x","span_id":"x","message":"our JSON body"}
Call when subgraph is finished and returns to router: {"timestamp":"2024-10-04T12:34:06.229539721Z","level":"TRACE","trace_id":"x","span_id":"x"}
As you can see, the time difference is around 30 seconds, which is way to long.
What am I doing wrong here?
Apollo Router version 1.56