Reject enum values, interface fields and union members that a type declares twice in 15.0.0
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- graphql, kotlin
調査の方向性
Start with SchemaParser#warnRepeated, createEnumObject, and createInterfaceObject, then read the repeats covered by TypeExtensionTest.repeats and extensions without a type keep building. Move those cases into an error test and check that the SchemaError names the type and repeated value, field, or member. Update the 15.0.0 release notes; done means repeats are rejected and the tests verify the error.
索引モデルが issue の本文から書いたものです。
説明
Since #855, extensions are merged into the type they extend. When a type ends up declaring an enum value, interface field or union member twice, e.g. in the type and again in an extension, tools keeps the first one and logs a warning:
enum Color { RED }
extend enum Color { RED GREEN }
Type 'Color' declares value 'RED' more than once, only the first one is kept.
graphql-java's SchemaGenerator rejects these schemas, and the spec doesn't allow an extension to redeclare what the type already has. But they built before #855, since the extension used to replace the type, so failing on them has to wait for a major release.
Keeping the first one hides mistakes though. interface Node { id: ID } plus extend interface Node { id: String } builds with id: ID, and only a log line says the extension's id was dropped.
What to change
- replace the warning in
SchemaParser#warnRepeatedwith aSchemaErrorthat names the type and the repeated value, field or member - drop the
distinctBy { it.name }on the enum values increateEnumObjectand the interface fields increateInterfaceObject - move the repeats out of
TypeExtensionTest.repeats and extensions without a type keep buildinginto a test for the error - mention it in the 15.0.0 release notes
- 主要言語
- Kotlin
- スター
- 824
- フォーク
- 175
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 52
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphql-java-kickstart/graphql-java-tools のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
graphql-java-kickstart/graphql-java-tools#896 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
graphql-java-kickstart/graphql-java-tools#886 ·
メンテナーはふだん 1 日以内に返信
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
メンテナーはふだん 1 日以内に返信
graphql-java-kickstart/graphql-java-tools の issue をすべて見る
似ている issue
-
enhancement impact:U1 P3 reach:R2 size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement triaged
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
ankidroid/Anki-Android#22677 ·
メンテナーはふだん 1 日以内に返信
-
Type Pick Request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
reactwg/react-native-releases#1456 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yschimke/homeassistant-remotecompose#1038 ·
メンテナーはふだん 1 日以内に返信