Directive wirings see a type reference on recursive input fields
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- backend-api-design
Línea de trabajo
Start by comparing this schema's directive wiring during type construction with graphql-java's SchemaGenerator behavior described in the issue; the issue names no source files or tests. Reproduce the recursive Tree input case and confirm the GraphQLTypeReference seen for and. Done means directive wiring runs after schema assembly and recursive fields expose the resolved input type across the affected object, interface, union, enum, and input object cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A SchemaDirectiveWiring that looks at the type of a recursive input field gets a GraphQLTypeReference instead of the input object:
directive @check on INPUT_FIELD_DEFINITION
type Query {
trees(filter: Tree): Int
}
input Tree {
and: [Tree!] @check
name: String @check
}
In onInputObjectField, GraphQLTypeUtil.unwrapAll(element.type) is a GraphQLTypeReference for and (name is a GraphQLScalarType as expected). The same schema and wiring through plain graphql-java's SchemaGenerator gives a GraphQLInputObjectType for and.
So any wiring that walks input types and calls unwrapAll fails with ClassCastException: GraphQLTypeReference cannot be cast to GraphQLUnmodifiedType. I believe that includes graphql-java-extended-validation's DirectivesAndTypeWalker, but I haven't run it against this schema.
#843 fixed the non-recursive case (input objects behind a list or non-null wrapper) and left cycles out. Types are immutable, so one field of a cycle has to stay a reference while the type is being built. graphql-java only runs directive wirings once the whole schema is assembled, so its wirings never see that reference. Ours run while types are being built, so they do.
The fix is probably to hold off all directive wiring until the schema is assembled. That touches objects, interfaces, unions and enums too, not just input objects. I haven't prototyped it.
Not the same as #36 or #450. Those were about recursive inputs not building at all, and that's fixed.
- Lenguaje dominante
- Kotlin
- Estrellas
- 824
- Forks
- 175
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 52
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
-
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
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
graphql-java-kickstart/graphql-java-tools#881 ·
Los mantenedores suelen responder en 1 día
Todos los issues de graphql-java-kickstart/graphql-java-tools
Issues similares
-
area/kotlin
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
dafonton77-tech/Cadreenf#11 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Hy4ri/hermes-mobile#1647 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
supabase-community/supabase-kt#1429 ·
Los mantenedores suelen responder en 5 días