"Persisted queries" / "stored operations"
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
首先查看 issue 文本以及链接的 persisted-query 和 stored-operation 参考资料,以了解相互竞争的实现方案和术语。需要确定 stored operations 应如何表示和记录的规范方向,才能算完成。
由索引模型根据 Issue 内容生成。
描述
The terms "persisted queries" and "stored operations" are typically used interchangably. The traditional name is "persisted queries", but the term "stored operations" acknowledges that this approach can be used with mutation and subscription operations in addition to queries.
There's lots of different implementations of this feature, often with different aims. Sometimes it's used to block all but a small allow-list of operations. Sometimes it's used to reduce network bandwidth for GraphQL requests. Sometimes it's used to improve HTTP cacheability (GET requests with short URLs).
Relevant links:
- https://relay.dev/docs/guides/persisted-queries/
- https://www.apollographql.com/docs/apollo-server/performance/apq/
- https://github.com/graphile/persisted-operations
- https://chillicream.com/docs/hotchocolate/v13/performance/persisted-queries/
- https://chillicream.com/docs/hotchocolate/v13/performance/automatic-persisted-queries
- https://github.com/restorando/graphql-query-whitelist
Some implementations require queries to be persisted to the server in advance of receiving queries (e.g. at build time); others negotiate the storage of the query with the server for bandwidth optimisation (e.g. automatic persisted queries).
Typically persisted queries replace the query in {query, variables, operationName} with another field (typically id) that indicates an identifier for the operation - perhaps a number or hash.
Typically stored operations remove the query in {query, variables, operationName} and instead indicate the operation via a hash or similar identifier in the extensions property.
One of the optimisations that stored operations enable is that the parse and validate steps of GraphQL execution can be performed once per stored operation and cached; future requests for the same stored operation can jump straight to the execute step.
- 主要语言
- JavaScript
- 星标
- 428
- 派生
- 70
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphql/graphql-over-http 的其他 Issue
-
难度 3/5 半天 新手友好度 25/100
graphql/graphql-over-http#446 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
graphql/graphql-over-http#415 ·
-
难度 5/5 一周以上 新手友好度 25/100
graphql/graphql-over-http#392 · 4 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
graphql/graphql-over-http#242 · 8 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
graphql/graphql-over-http#216 · 15 条评论 · 1 个 reaction ·
查看 graphql/graphql-over-http 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 66/100
remotion-dev/remotion#13341 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
svix/svix-webhooks#2808 ·
维护者通常 1 天内回复