3 ms·
> You should find yourself being able to build a query that delves 4+ relations deep without much trouble. How is that a good thing from the server’s point of
by dmitriid 8y ago
> You should find yourself being able to build a query that delves 4+ relations deep without much trouble.
How is that a good thing from the server’s point of view?
As mentioned elsewhere, almost no one talks avout the server shen talking about GraphQL.
When you can construct an ad-hoc query 4+ relations deep on the client, how can anyone efficiently handle this on the server? You can’t even properly cache GraphQL requests.
- geogeim 8y agoThis is the problem I had with graphql. Indeed it simplifies the interface between the backend and the frontend of your application (that is when the api can be cleanly mapped to a graph) but it doesn't really solve the problem of minimizing roundtrips, it just moves it between the backend and the database. Because the database I was querying was not on the same network I was losing seconds (!) doing roundtrips on the network gathering all the data necessary for a single complex graphql query. You may say: well use something like postgraphile but what if you did not designed the database and so it doesn't map cleanly to your graphql object tree? I had to waste a week implementing a postgres query generator so I can remove the latency. Not fun, especially when you have deadlines.