惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
D
DataBreaches.Net
F
Full Disclosure
腾讯CDC
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
Project Zero
Project Zero
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security

GraphQL

Graphql 太难用了,难监控性能,难客户端缓存 - V2EX 国内用 GraphQL 的好像不多? - V2EX 请教一个 graphql subscriptions 问题 - V2EX 做前后端分离接口开发时,用 graphql 的多吗? - V2EX 关于 N+1 问题解决方案的疑问 - V2EX Hello GraphQL - V2EX prisma 和 普通 orm 的区别是什么? - V2EX
有用过 GraphQL 的吗?可以进来说说相比 restful 的优劣吗? - V2EX
ReinerShir · 2021-01-26 · via GraphQL

近 1 年都在和 GraphQL 打交道,接触的方面包括:
1. 前端 apollo client 和后端 node.js apollo server 打交道,后端是重业务代码
2. 前端 apollo client 和后端 graphql ruby 打交道,后端也是重业务代码
3. 前端 react query 和后端 node.js apollo server 打交道,后端是 BFF 层

总结一下个人对 GraphQL 评价
优点:
- schema-driven 的开发流程,衍生出一系列好处:代码生成、精确的接口文档。类比 RESTful 的 swagger 。
- 很容易实现 field 粒度的 ACL
- 良好的类型系统,对 normalization 、cache 、codegen 等都非常友好
- 有官方 spec,不像 RESTful 有各种不同的解读方式(尽管 spec 没有提到分页,但 relay style 已经成为了事实标准)

缺点:
- 各类 HTTP debug 工具支持都很弱
- 大规模 scale out 的实践比较少,缺少成熟的基础设施( gateway,细粒度监控,日志,限流,等等)
- 很难利用 HTTP cache,需要前端自己实现 cache 系统
- 服务端 n+1 查询问题
- 和 RESTful 一样,只是一种工具,没有官方范式。有人会写嵌套很深的 field,有人会像 RESTful 一样全部扁平化,甚至有人写出来是 RPC style (我见过 root query 顶层 field 全部是 `getXxxByXxx` 的命名风格)
- 使用最广泛的 apollo-client 至今稳定性欠佳,bug 很多