Deprecate the introspectionEnabled option and remove it in 15.0.0
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 56/100
- Type d'issue
- Refactorisation
- Clarté
- Clairement spécifiée
- Activité
- Active
- Domaine
- backend-api-design
Piste de recherche
Start with SchemaParserOptions, SchemaParser.parseSchemaObjects, and the related tests in IntrospectionTest; inspect how #849 added BlockedFields and how the existing option is exposed. Deprecate the builder method and property in a 14.x release with guidance to the graphql-java switches, then remove them and the BlockedFields logic and tests in 15.0.0. Done when the option is removed in 15.0.0 and introspection behavior follows the migration guidance.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
SchemaParserOptions.introspectionEnabled(false) turns off introspection with a field visibility that hides every field of the introspection types (__Schema, __Type, ...). Until #849 that was graphql-java's NoIntrospectionGraphqlFieldVisibility, which graphql-java deprecated in v22 (graphql-java/graphql-java#3526):
NoIntrospectionGraphqlFieldVisibility is another way to do this but it does not allow dynamic on or off and it makes the schema invalid according to spec.
Their replacement checks __schema and __type when the query runs and returns an "introspection disabled" error. It has two switches:
Introspection.enabledJvmWide(false)for the whole JVMIntrospection.INTROSPECTION_DISABLEDin theGraphQLContextof a single request
We can't use either one from the library. We don't execute requests, so we can't set the context key, and calling enabledJvmWide(false) from SchemaParser would also turn introspection off for every other schema in the app. So #849 swapped NoIntrospectionGraphqlFieldVisibility for the BlockedFields it wraps, which keeps the old behaviour, including its problems. Apps can use the graphql-java switches directly, so we should point them there and drop the option.
What to change
- deprecate
SchemaParserOptions.Builder.introspectionEnabled(...)and theintrospectionEnabledproperty in a 14.x release, pointing to the two switches - in 15.0.0, remove both, the
BlockedFieldsblock inSchemaParser.parseSchemaObjectsand the tests inIntrospectionTestthat turn it off
Migration
// before
SchemaParserOptions.newOptions().introspectionEnabled(false)
// after, for the whole JVM
Introspection.enabledJvmWide(false)
// after, per request
ExecutionInput.newExecutionInput()
.query(query)
.graphQLContext(mapOf(Introspection.INTROSPECTION_DISABLED to true))
With the graphql-java switches, an introspection query fails with an "introspection disabled" error when it runs, instead of the FieldUndefined validation error it gets now.
- Langage dominant
- Kotlin
- Étoiles
- 824
- Forks
- 175
- Merge moyen
- 2 j 1 h
- PR mergées (30 j)
- 59
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de graphql-java-kickstart/graphql-java-tools
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
graphql-java-kickstart/graphql-java-tools#905 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
graphql-java-kickstart/graphql-java-tools#900 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
Les mainteneurs répondent en général sous 1 jour
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0Ouverteenhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de graphql-java-kickstart/graphql-java-tools
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
lysine-dev/okhttp#9814 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
getdictus/dictus-android#187 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation follow-up
Difficulté 1/5 Moins d'une heure Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
follow-up
Difficulté 1/5 Moins d'une heure Accessibilité débutants 83/100
yschimke/meshcore-mobile#586 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Kotlin/kotlinx-io#529 ·