Is REST perfect? Probably not. But it certainly does its job, and that's why most middle-tier APIs these days, whether it be those that power web applications or mobile apps, are in REST, with the backend itself being written in a variety of languages (PHP, Python, Java, C#, etc).<p>I will admit that core REST doesn't support basic "querying" functionality, or even things like pagination, filtering, sorting, etc, which is why there are a set of standards, or best practices on top of REST that aim to standardize those commonly used patterns. [1] [2] [3]<p>Finally REST, whether by design or not, follows the KISS principle (Keep It Simple and Stupid), and that's probably why it's gained as much traction as it has over the years.<p>Want to get a user object? GET /user/<id>
Want to update it? POST or PUT /user/<id>
Get a list of all users? GET /user/<p>If you look at just the "basic" examples for GraphQL, you will understand why it's never going to replace REST in its current form.<p>[1] Microsoft's OData: <a href="https://www.odata.org/" rel="nofollow">https://www.odata.org/</a>
[2] <a href="https://www.moesif.com/blog/technical/api-design/REST-API-Design-Filtering-Sorting-and-Pagination/" rel="nofollow">https://www.moesif.com/blog/technical/api-design/REST-API-De...</a>
[3] <a href="https://stackoverflow.com/questions/207477/restful-url-design-for-search?rq=1" rel="nofollow">https://stackoverflow.com/questions/207477/restful-url-desig...</a>
IMHO what makes or breaks a paradigm like REST or GraphQL in real-life is the state of tooling made by third-parties to enable its adoption in the workplace or personal projects.<p>Working in Python-land I'm pretty confident REST wouldn't have been as ubiquitous if it wasn't for tools like Flask, marshmallow, and the myriad of other tools.<p>Having taken up GraphQL in personal projects I can say that at least in Python the tooling just ain't there so until it gets there I don't see GraphQL killing anything.
REST can practically never die - it's just describes how most of the internet works: HTTP + links.<p>Maybe people will stop using REST APIs, but REST will still be a thing as long as HTTP is.<p>GraphQL seems like it can solve some pain points of REST once you start using REST APIs at a massive scale. REST improves on SOAP in even the tiniest of cases.