Reject directives applied at the wrong location, without a required argument or twice in 15.0.0
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend-api-design, release, testing
Línea de trabajo
Start with SchemaParser#directiveProblems and SchemaParser#directivesOf, then read DirectiveTest.should warn about invalid applied directives and keep them. Replace the warnings with SchemaError using the same messages, and cover the type extension case for duplicate non-repeatable directives. Update the 15.0.0 release notes; done when invalid applications fail with the expected errors and the test and release notes describe the change.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Since #225, tools logs a warning when a schema applies a directive in a way its definition doesn't allow, and still builds the schema:
directive @uppercase on OBJECT
directive @auth(role: String!) on FIELD_DEFINITION
directive @cached(ttl: Int) on FIELD_DEFINITION
type Query {
motto: String @uppercase
secret: String @auth
members: [Member!] @cached @cached(ttl: 10)
}
Directive @uppercase is applied to field 'Query.motto', but it's declared on OBJECT, not FIELD_DEFINITION.
Directive @auth is applied to field 'Query.secret' without its required argument 'role'.
Directive @cached isn't repeatable but is applied more than once to field 'Query.members'.
graphql-java's SchemaGenerator rejects all three, and the spec doesn't allow them either. But they always built with tools, so failing on them has to wait for a major release.
What to change
- replace the warnings from
SchemaParser#directiveProblemswith aSchemaErrorthat has the same messages - probably do the same for the warning in
SchemaParser#directivesOf, when a type extension applies a non-repeatable directive the type already has. It's the same mistake, it just drops the repeat today - turn
DirectiveTest.should warn about invalid applied directives and keep theminto a test for the error - mention it in the 15.0.0 release notes
- 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
-
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
-
Directive wirings see a type reference on recursive input fieldsPosiblemente ocupada @oryan-block la tomó hoy. Abiertobug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
graphql-java-kickstart/graphql-java-tools#875 ·
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