3 ms·
I think arguments against REST are more like arguments against one way how to implement REST API. When you look at PostgREST REST API, you will see you can sel
by jiriknesl 4y ago
I think arguments against REST are more like arguments against one way how to implement REST API.
When you look at PostgREST REST API, you will see you can select related data, you can pick what fields, so you don't underfetch or overfetch, you don't have to create new API endpoints…
You need to add your schema to check for data validity, but that's something you'd have to do anyway.
- tmikaeld 4y agoOur team chose REST for a new rebuild of a huge project, mainly because of complexity, performance and maintainability issues. If we where to choose GraphQL, i don’t think we’d be even near finished yet. And as you say, implementation matters a lot, we don’t feel constrained by rest at all.
- eurasiantiger 4y agoWhat if your database directly supported GraphQL?
- tmikaeld 4y agoWe would still choose REST, the reason for the complexity is mostly implementation of the system design, which affects every part of the API and how it functions. We'd need to re-think and re-design the entire back-end (Especially caching/scaling) and front-end. I was the one to suggest GraphQL during planning, but after considering all of the parts it was clear that it would be months of additional work with too many unknowns, which isn't in the budget.
- eurasiantiger 4y agoCaching would be easier since BFFs and frontends would now be able to cache at entity level instead of request level.