3 ms·
"There's nothing that you can do with a RESTful api that can't be done with GraphQL" We discussed GraphQL internally, and came to the conclusion that it mostly
by MrBuddyCasino 10y ago
"There's nothing that you can do with a RESTful api that can't be done with GraphQL"
We discussed GraphQL internally, and came to the conclusion that it mostly makes sense as a performance optimization, which was its original use case, and not as an "alternative" to REST APIs.
Drawbacks:
- you loose the ability to easily cache
- your API is more strongly coupled to your data model, which makes evolving it more difficult
So GraphQL makes sense when
- data size / performance is key
- the app is mature and the data model doesn't change very much
- neebz 10y agoWe have struggled from performance perspective because we have a relational database at the back. GraphQL has been limited our overall use of JOINS which means multiple queries to fetch data for different data which could've been fetched in a single JOIN query.
- ruslan_talpa 10y agoIf your database is PostgreSQL (which it should be :P) then https://subzero.cloud https://subzero.cloud might solve that for you. Each GraphQL request is translated to a single database query.
- neebz 10y agoWe are using MySql :)