Reject enum values, interface fields and union members that a type declares twice in 15.0.0
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- graphql, kotlin
- Bereich
- backend-api-design, testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Kotlin
- Sterne
- 824
- Forks
- 175
- Ø Merge
- 2 T. 5 Std.
- Gemergte PRs (30 T.)
- 52
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus graphql-java-kickstart/graphql-java-tools
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 74/100
graphql-java-kickstart/graphql-java-tools#896 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
graphql-java-kickstart/graphql-java-tools#886 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in graphql-java-kickstart/graphql-java-tools
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
auth0/Auth0.Android#1101 ·
Maintainer antworten meist innerhalb von 1 Tag
-
LiquidGlass / LiquidGlassContainer (iOS): padded content measured at the outer width and overflows by the paddingEvtl. vergeben @aleclarson hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
NativeScript/NativeScript#11561 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
navikt/mock-oauth2-server#1129 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
-
unconfirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
thunderbird/thunderbird-android#11778 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag