GraphQL consists of a type system, query language and execution semantics, static validation, and type introspection, each outlined below. To guide you through each of these components, we've written an example designed to illustrate the various pieces of GraphQL.
-https://github.com/facebook/graphql
Falcor lets you represent all your remote data sources as a single domain model via a virtual JSON graph. You code the same way no matter where the data is, whether in memory on the client or over the network on the server.
-http://netflix.github.io/falcor/
Falcor 和 GraphQL(在 Relay 的上下文中)有什么区别?
最佳答案
我已查看Angular Air Episode 26: FalcorJS and Angular 2哪里Jafar Husain答案如何GraphQL与FalcorJS相比。这是摘要(释义):
- FalcorJS 和 GraphQL 正在解决相同的问题(查询数据、管理数据)。
- 重要的区别是 GraphQL 是一种查询语言,而 FalcorJS 不是。
- 当您向 FalcorJS 请求资源时,您非常明确地请求有限序列的值。 FalcorJS 确实支持范围之类的东西,例如
流派[0..10]
。但它不支持开放式查询,例如流派[0..*]
. - GraphQL 是基于集合的:给我所有真实的记录、按此排序等。从这个意义上说,GraphQL 查询语言比 FalcorJS 更强大。
- 借助 GraphQL,您可以拥有强大的查询语言,但您必须在服务器上解释该查询语言。
贾法尔认为,在大多数应用程序中,从客户端到服务器的查询类型共享相同的形状。因此,拥有特定且可预测的操作(例如 get 和 set)可以提供更多利用缓存的机会。此外,许多开发人员熟悉在 REST 架构中使用简单的路由器来映射请求。
最后的讨论围绕 GraphQL 的功能是否超过复杂性展开。
关于graphql - Falcor 和 GraphQL 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32057785/