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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Do We Need GraphQL?

7 点作者 brakmic超过 8 年前

1 comment

moxious超过 8 年前
&gt; In the world of GraphQL, HTTP is an unfortunate transport mechanism rather than something to be embraced. Rather than using the standard semantics, we ignore them completely by treating HTTP like a dumb pipe.<p>Yep, this seems to be the nub of it. Whether this is good or bad depends on your perspective. On one side, REST is about transferring representations of particular objects. If you&#x27;re in the graph query world, you&#x27;re not looking at things an object at a time. So maybe side-stepping what HTTP provides in order to build a higher-level abstraction is good, and HTTP should just be a dumb pipe.<p>On the other hand, HTTP has this entire world of primitives you can use, and treating it like a dumb pipe throws away many years of software and architecture advances, in order for HTTP to provide something that really any transport could probably just as easily.<p>If graph query really catches on, we&#x27;ll have to deal with the mismatch between <i></i>what graph query is trying to do, and what HTTP was built to do<i></i>.<p>Personally as far as graph query goes, I&#x27;m partial to the Cypher query language (<a href="https:&#x2F;&#x2F;neo4j.com&#x2F;developer&#x2F;cypher-query-language&#x2F;);" rel="nofollow">https:&#x2F;&#x2F;neo4j.com&#x2F;developer&#x2F;cypher-query-language&#x2F;);</a> I&#x27;d like a true declarative query language rather than a way of shoe-horning similar ideas into a JSON format. But if the web goes in a direction of making any kind of graph query more easy and available, that&#x27;s not going to be a loss as far as I&#x27;m concerned.