TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

GraphQL is the King, R-I-P Rest

16 点作者 gina650超过 8 年前

4 条评论

niftich超过 8 年前
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_lahoda超过 8 年前
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.
gina650超过 8 年前
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>
atmartins超过 8 年前
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 未加载