5 ms·
I’m surprised no one has mentioned the obvious interest of the author working for a company that provides REST tooling, reaching the conclusion that REST is a b
by karmajunkie 3y ago
I’m surprised no one has mentioned the obvious interest of the author working for a company that provides REST tooling, reaching the conclusion that REST is a better option.
- dphuang2 3y agoWe use GraphQL internally but I admit I am currently more biased towards REST after battling with GraphQL, building a OpenAPI-based company, and playing with ergonomic REST-based frameworks like FastAPI. I still think the GraphQL DX is still miles ahead of OpenAPI and I really admire the best practices in GraphQL prescribed by Relay. But right now, REST is king for me. Your observation is sort of the point of this article. Everyone has their opinion but nobody is de facto right.
- nivertech 3y agoYou should have put a proper disclosure in the post to avoid speculation. Also it seems off to do all this research, and then instead of summarizing it properly, throw evewrything away and finish it with your own sentiment. I remeber there was a paper where the reserches asked students to implement the same API using either REST/HTTP, or GraphQL, and the conclusion were in favor of GraphQL. I would've added reviews of the research papers on this subject, in addition to the social media posts. The former adding more rigor than the latter.
- dphuang2 3y agoFair points, I added a disclosure for clarity in future reference. That being said, the Pro REST perspectives do scare me away from GraphQL in production. But seeing some posts about PostGraphile + Persisted Queries is interesting. Also, research papers would have been nice to address but I am satisfied with the many hours this took to compile. A future follow-up may be necessary.
- nivertech 3y agoWhat noboody mentioned is that generic tools like AWS AppSync, PostGraphile, Hasura, etc. are actually anti-pattern for anything public facing, as they expose the data model and copy it as-is in GraphQL. GraphQL server is a special case of the BFF pattern, and the whole purpose here is to decouple FE from the underlying data model on the BE, and let both to iterate faster without blocking each other.
- unusualmonkey 3y agoWhy is this an anti-pattern?
- nivertech 3y ago> they expose the data model and copy it as-is in GraphQL. > GraphQL server is a special case of the BFF pattern, and the whole purpose here is to decouple FE from the underlying data model on the BE, and let both to iterate faster without blocking each other.
- unusualmonkey 3y ago> they expose the data model and copy it as-is in GraphQL. This isn't inherently an anti-pattern. > GraphQL server is a special case of the BFF pattern, and the whole purpose here is to decouple FE from the underlying data model on the BE, and let both to iterate faster without blocking each other. A) Says who? B) Why do we have to follow that specific dogma?
- nivertech 3y agoWho says that spaghetti code and Big Ball of Mud are anti-patterns? ;) Why not to expose SQL interafce or DynamoDB API directly to the client? ;) While tools like AWS AppSync, Hasura, & PostGraphile accelerate initial development, the bulk of SW Engineering costs are adding new features & providing ongoing support and maintenance.