Why are nodes optional?
还没有人认领这个 Issue。
评估
调研方向
阅读 graphql_relay/connection/connection.py 第 44 行附近的内容,以确认 edges 和 nodes 是如何声明的。调查是否可以在不破坏现有 schema 的情况下配置可空性;当存在一个显式选项且生成的 schema 反映所选的可空性时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
I was trying to dig through this to figure it out, and I apologize if there's a good reason for this.
It seems to me that a paginated connection (e.g. DjangoConnectionField or DjangoFilterConnectionField) always has edges and nodes. What's the use case for these being nullable?
The reason I bring this up is because, when using TypeScript with the generated schema, it results in lengthy checks like this:
{edges.map(edge => (
<div>
{edge &&
edge.node &&
edge.node.id (
...<JSX here>
As far as I can tell this is set up here:
https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/connection/connection.py#L44
Could there be required on edges/nodes? At least as an option it'd be a breaking change. Right now I'm not sure how to override this.
- 主要语言
- Python
- 星标
- 143
- 派生
- 41
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphql-python/graphql-relay-py 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 35/100
graphql-python/graphql-relay-py#16 · 9 条评论 · 3 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 45/100
graphql-python/graphql-relay-py#12 · 4 条评论 · 3 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 35/100
graphql-python/graphql-relay-py#9 · 2 个 reaction ·
查看 graphql-python/graphql-relay-py 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100