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

In 3.1.0, `resolve_type` method on Interfaces and Unions no longer supports returning the GraphQL Type as a string

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

@SAY-5 がすでに取り組んでいます。

2026年5月25日 から。

  • #1605 @SAY-5 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api, backend

調査の方向性

まず、ここで説明されている 3.1.0 のリグレッションで変更された resolve_type の処理を確認し、リンク先の fork の pull request で提案されている変更と比較してください。文字列の GraphQL 型結果を対象とする単体テストを追加し、その後、関連するテストスイートを実行して、Graphene Type の結果を壊すことなく動作することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

🐛 bug
  • What is the current behavior?
    As of 3.1.0, the resolve_type method on Interfaces and Unions no longer supports returning the GraphQL Type as a string as opposed to the actual Graphene Type. I think this might be an unintended regression from https://github.com/graphql-python/graphene/pull/1421.

  • What is the expected behavior?
    Our project heavily depends on resolve_type returning a string for the GraphQL Type as opposed to the Graphene Type that implements it.

  • What is the motivation / use case for changing the behavior?
    While it's possible to refactor most of our code to return the Graphene Type, there are some cases where it's very difficult to break circular imports. The reason for that is that some of our implementations of the resolve_type method delegates to returning a property of an Enum and the Enum definition can't reference the Graphene Type because the Graphene Type references the enum.

  • Please tell us about your environment:

    • Version: Trying to upgrade to 3.1.0.
    • Platform: Python 3.12.2 on Linux
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
    I created https://github.com/perlow/graphene/pull/1 in a fork. I don't have write permission the repo to request a merge. If this looks reasonable, I can add a unit test for the behavior.

主要言語
Python
スター
8.2k
フォーク
822
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

graphql-python/graphene のほかの issue

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

似ている issue

Python の issue をもっと見る

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

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