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 is the King, R-I-P Rest

16 pointsby gina650over 8 years ago

4 comments

niftichover 8 years ago
I wrote about GraphQL on here before [1]. I don&#x27;t share the author&#x27;s enthusiasm that it&#x27;s &quot;awesome&quot; that &quot;the schema is all backed by arbitrary code&quot; -- I think this is a bad trade-off, because you still have to have some custom data-munging layer between your GraphQL acceptor and your backend datasources, just like you had to do to, but with different code, to implement a REST service.<p>However, once canned ORMs or datastores that natively understand GraphQL (like dgraph) become available, the ecosystem will definitely enable rapid integration -- provided we keep in mind the lessons learned about user-supplied queries from the early SQL-on-the-web days.<p>[1] <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=niftich%20graphql&amp;sort=byDate&amp;type=comment" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=niftich%20graphql&amp;sort=byDate&amp;...</a>
评论 #13094359 未加载
dzmitry_lahodaover 8 years ago
Very similar. Typed. Get only requested properties. Request graph shape you want.<p><a href="https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;guide&#x2F;current&#x2F;_buckets_inside_buckets.html" rel="nofollow">https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;guide&#x2F;current&#x2F;...</a><p><a href="https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;reference&#x2F;current&#x2F;mapping.html#_example_mapping" rel="nofollow">https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;reference&#x2F;curr...</a><p><a href="https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;reference&#x2F;current&#x2F;search-request-source-filtering.html" rel="nofollow">https:&#x2F;&#x2F;www.elastic.co&#x2F;guide&#x2F;en&#x2F;elasticsearch&#x2F;reference&#x2F;curr...</a><p>And I thought ElasticSearch API is REST. And it is JSON.
gina650over 8 years ago
As mentioned in the first talk at the GraphQL summit (350+ attendees)<p>Github dumped REST for GraphQL <a href="http:&#x2F;&#x2F;thenewstack.io&#x2F;github-dumps-rest-graphql-api&#x2F;" rel="nofollow">http:&#x2F;&#x2F;thenewstack.io&#x2F;github-dumps-rest-graphql-api&#x2F;</a><p>Rise of GrapQL <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bPlOGKPLtqM&amp;list=PLpi1lPB6opQzSSOQU8JQLExuP1JUXPtmA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bPlOGKPLtqM&amp;list=PLpi1lPB6op...</a>
atmartinsover 8 years ago
What about permissions? What if the logged in user is only allowed to see certain fields? Do I make a table that describes every possible field and which roles can access it? How do I know what&#x27;s available to query, without reading docs? What about hypermedia? Do I have to gain knowledge about a large system&#x27;s data structure to query it?
评论 #13094666 未加载