Add support for custom validators in default GraphQL backend
评估
调研方向
首先定位默认 GraphQL 后端的验证和执行路径,然后将其与 issue 所引用的 graphql/validation/rules/init.py 中的验证器列表进行比较。当自定义验证器能够在无需重新实现验证和执行的情况下扩展默认后端时,这项工作就完成了。
由索引模型根据 Issue 内容生成。
描述
The default GraphQL backend seems to perform validation prior to execution of a query. The validators that are being run are statically defined in https://github.com/graphql-python/graphql-core/blob/fe703f0d176c78b205d2abf929193f1e910fe4a0/graphql/validation/rules/__init__.py#L32-L57 and there doesn't seem to be a very good way to add custom validators to this list.
It would be nice to be able to extend the default GraphQL backend with your own validators, e.g. by having a overridable function called get_validators in the backend class that's used for getting the validators.
Right now the only option (as far as I'm aware) seems to be to completely re-implement the execution and validation logic if you don't want to monkeypatch the validators list.
- 主要语言
- Python
- 星标
- 371
- 派生
- 174
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphql-python/graphql-core-legacy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
Quiver source未关闭
难度 5/5 一周以上 新手友好度 20/100
graphql-python/graphql-core-legacy#286 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 35/100
graphql-python/graphql-core-legacy#280 · 2 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
graphql-python/graphql-core-legacy#266 · 1 个 reaction ·
查看 graphql-python/graphql-core-legacy 的全部 Issue
相似的 Issue
-
comp/gateway comp/plugins duplicate P3 type/bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#137019 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bot-triaged module: docs triaged
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
new-entry
难度 2/5 1-3 小时 新手友好度 78/100
BinWang28/audio-ai-hub#194 ·
-
confluence: a paged listing's links re-encode a parameter they carry, where real carries it as sent未关闭fidelity
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复