REST vs. GraphQL – A search for evidence on which is better
Yes, had this discussion on here before. While in REST you can more or less optimize a service to be performant at what it does, the moment there is another service that you need to fetch some additional data, the browser would be required to orchestrate that, which means you&#x27;re also waiting for the return trip on the first call before you can even get the secondary data. This alone makes REST far less favorable in my opinion.<p>The secondary is that operations are standardized in GQL. Whereas in REST I can pass data in through:<p>Query params<p>Body<p>Headers<p>Path variables<p>Each team will do this differently. In graphQL these inputs are pretty much standardized and you have the option to implement security through headers. This makes GQL decoupl-able from HTTP (at some point). That&#x27;s a great incentive too by itself since at some point the web may just be media distributions + services. Where media distributions is just HTML&#x2F;CSS&#x2F;JS&#x2F;etc... There&#x27;s new reasons as time moves forward media distributions needs to take place over HTTP.<p>The top response to this is caching - in other words every device on the planet knows HTTP so caching in GQL becomes a secondary thought. So yeah there&#x27;s that. GQL has some variously applied caching semantics - so YMMV but personally I still feel like the gains from the first point are so dramatic that most people won&#x27;t really care about this.