3 ms·
One downside is that depending on how your backend is structured, nested GraphQL queries can hit an arbitrary number of different endpoints, tables, services, o
by chrisco255 4y ago
One downside is that depending on how your backend is structured, nested GraphQL queries can hit an arbitrary number of different endpoints, tables, services, or databases behind the scenes. And some of those queries could take a long time to resolve and not cache as cleanly as individual endpoints.
- pyrolistical 4y agoAlso the lazy approach that nobody should ever do but we know everybody does at some point of connecting it directly to databases will leak data
- threatofrain 4y agoBut if you needed data from so many resources, don't you need to hit them up one way or another?
- chrisco255 4y agoPossibly. As mentioned, it's very easy to cache individual endpoints both locally on the client and on the server side with REST. Since GraphQL is so flexible, it doesn't make caching responses very easy. It's a trade-off.