Backwards compatibility issues with DIRECTIVE_DEFINITION location on older versions of graphql

Offen
#4,479 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
graphql, java
Bereich
api

Rechercherichtung

Start by reproducing the schema-printing and introspection behavior with the stated latest graphql-java version and graphql-java 25.0 consumer. Read the schema printing and introspection entry points, then define how a predicate or switch should produce a schema compatible with older versions and verify that DIRECTIVE_DEFINITION no longer breaks those consumers.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the problem

The latest versions of graphql-java has implemented https://github.com/graphql/graphql-spec/pull/1206

This allows a new location for directives

directive @onDirective on DIRECTIVE_DEFINITION

the standard @deprecated directives now allows itself to be on DIRECTIVE_DEFINITION

However if this modern schema is then represented to some other consumer who is on a graphql version that is older and this is very common right now) then they consumer will choke on the schema

To Reproduce

Print a schema on latest graphql-java (say 0.0.0-2026-03-18T00-52-57-e53ab1a. Consume that schema on a client running an older version of graphql-java (say 25.0)

** Design concerns **

Normally the version of graphql-java is localised to the running instance and hence this additive change would be ok but schema printing and introspection are ways in which schema can leave the runtime version of the server and need to be run on older versions.

I think there should be a "predicate" / "switch" mechanism that allows older versions (1 back say) of schema to be printed / produced.

Vorherrschende Sprache
Java
Sterne
6.2k
Forks
1.1k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
27

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus graphql-java/graphql-java

Alle Issues in graphql-java/graphql-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.