4 ms·
I think there are 2 subtleties here on where you optimize perf: 1. Frontend makes n+1 requests to the api. Either use GraphQL or build a custom endpoint that s
by tango12 3y ago
I think there are 2 subtleties here on where you optimize perf:
1. Frontend makes n+1 requests to the api. Either use GraphQL or build a custom endpoint that shapes a perfect response.
2. Build an api server that fetches data from the db efficiently without n+1 hitting the DB.
The whole tension introduced with resolver/data-loader ways of building GraphQL, is that while it makes 1 easy, it makes 2 harder. Compared to bespoke REST-ish endpoints.
- DanielHB 3y agotrue, but ORMs also make 2. harder