TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GraphQL Didn't Kill REST

35 pointsby mengledowlalmost 7 years ago

4 comments

samspencalmost 7 years ago
Is REST perfect? Probably not. But it certainly does its job, and that&#x27;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&#x27;t support basic &quot;querying&quot; 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&#x27;s probably why it&#x27;s gained as much traction as it has over the years.<p>Want to get a user object? GET &#x2F;user&#x2F;&lt;id&gt; Want to update it? POST or PUT &#x2F;user&#x2F;&lt;id&gt; Get a list of all users? GET &#x2F;user&#x2F;<p>If you look at just the &quot;basic&quot; examples for GraphQL, you will understand why it&#x27;s never going to replace REST in its current form.<p>[1] Microsoft&#x27;s OData: <a href="https:&#x2F;&#x2F;www.odata.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.odata.org&#x2F;</a> [2] <a href="https:&#x2F;&#x2F;www.moesif.com&#x2F;blog&#x2F;technical&#x2F;api-design&#x2F;REST-API-Design-Filtering-Sorting-and-Pagination&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.moesif.com&#x2F;blog&#x2F;technical&#x2F;api-design&#x2F;REST-API-De...</a> [3] <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;207477&#x2F;restful-url-design-for-search?rq=1" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;207477&#x2F;restful-url-desig...</a>
评论 #17579934 未加载
评论 #17573090 未加载
somada141almost 7 years ago
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&#x27;m pretty confident REST wouldn&#x27;t have been as ubiquitous if it wasn&#x27;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&#x27;t there so until it gets there I don&#x27;t see GraphQL killing anything.
评论 #17572825 未加载
评论 #17573296 未加载
评论 #17572799 未加载
评论 #17574009 未加载
HumanDrivenDevalmost 7 years ago
Here I was continuing my naive existence, blissfuly unaware that REST was even dead!
评论 #17573457 未加载
评论 #17572515 未加载
icc97almost 7 years ago
REST can practically never die - it&#x27;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.
评论 #17579729 未加载