3 ms·
+1 on this. GraphQL is a great way to actually decouple your API from underlying database schema. When you start thinking not about specific REST endpoints, but
by Envek 6y ago
+1 on this. GraphQL is a great way to actually decouple your API from underlying database schema. When you start thinking not about specific REST endpoints, but about API data model in general, it turns out that it is much better to hide many database-level specifics and provide more natural data model to clients.
- mattmcknight 6y agoThe same advice applies to REST.
- ZephyrBlu 6y agoIt seems dangerous to assume that GraphQL decouples your API from the database, considering that there are still performance implications. If your GraphQL schema requires expensive queries because it has a different schema than your database, is it really decoupled?
- thom 6y agoBut you're still actually getting that data from somewhere (maybe even several places). You absolutely have to consider deeply the performance characteristics of complicated operations across these datastores to be able to deliver a sane API. There's only so much you can hide when you allow arbitrary joins and filters etc.