Consider making the `query` parameter optional?

未关闭
#216 15 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
领域
api

调研方向

首先阅读链接的 pull request 讨论以及 GraphQL over HTTP 规范中关于查询参数的表述,然后查看 graphql-yoga 关于空查询参数的讨论。完成的标准是就省略查询参数是否可以支持持久化操作并同时保持符合规范作出决定并记录下来。

由索引模型根据 Issue 内容生成。

描述

Reference:
https://github.com/graphql/graphql-over-http/pull/175#discussion_r917932366

just pulling this out in case there is not another issue to track

in my view, query should be optional so that persisted operations, automatic or otherwise, could be considered spec-compliant.

The spec language would say something like that “the document to be executed, when sent within the http request, should be contained within the optional query parameter. When not included, the implementation can use an implementation defined method of determining the operation…”

otherwise, spec compliant implementations might be tempted to send empty query parameters to be compliant. See: https://github.com/dotansimha/graphql-yoga/pull/1589#discussion_r944641768

Tagging below discussants from those issues:
@enisdenjo
@ardatan
@glasser
@benjie

主要语言
JavaScript
星标
428
派生
70
平均合并
11 分钟
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

graphql/graphql-over-http 的其他 Issue

查看 graphql/graphql-over-http 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。