Deprecate the introspectionEnabled option and remove it in 15.0.0
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend-api-design
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Kotlin
- Estrellas
- 824
- Forks
- 175
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 53
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de graphql-java-kickstart/graphql-java-tools
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
graphql-java-kickstart/graphql-java-tools#896 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
graphql-java-kickstart/graphql-java-tools#886 ·
Los mantenedores suelen responder en 1 día
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0Abiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
Los mantenedores suelen responder en 1 día
Todos los issues de graphql-java-kickstart/graphql-java-tools
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
leboncoin/spark-android#2342 ·
Los mantenedores suelen responder en 1 día
-
The Voraton URL has been changedPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoBug Domain changed
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
keiyoushi/extensions-source#20257 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Improve Transition AnimationsAbiertofeature
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
user-grinch/RivoPhoneApp#302 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
LeanBitLab/LeanType#713 · 1 comentario ·
Los mantenedores suelen responder en 1 día