Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Deprecate the introspectionEnabled option and remove it in 15.0.0

Abierto
#858 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Stack tecnológico
graphql, java, kotlin

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

enhancement

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 JVM
  • Introspection.INTROSPECTION_DISABLED in the GraphQLContext of 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 the introspectionEnabled property in a 14.x release, pointing to the two switches
  • in 15.0.0, remove both, the BlockedFields block in SchemaParser.parseSchemaObjects and the tests in IntrospectionTest that 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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de graphql-java-kickstart/graphql-java-tools

Todos los issues de graphql-java-kickstart/graphql-java-tools

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.