Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Why are nodes optional?

オープン
#19 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
graphql, python
領域
api

調査の方向性

graphql_relay/connection/connection.py の44行目付近を読み、edges と nodes がどのように宣言されているかを確認してください。既存のスキーマを壊さずに nullability を設定できるか調査してください。明示的なオプションが存在し、生成されたスキーマに選択した nullability が反映されれば完了です。

索引モデルが 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 はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphql-python/graphql-relay-py のほかの issue

graphql-python/graphql-relay-py の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。