GraphQL interfaces should still be annotated when using the `@annotate` directive
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
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- backend-api-design, tooling
Línea de trabajo
Comienza con el ejemplo de esquema GraphQL y el procesamiento de la directiva @annotate para interfaces generadas; después, revisa las pruebas de generación existentes, si están disponibles. Añade un caso de regresión que cubra las anotaciones en una interfaz y determina si la generación debe aplicarlas o informar de que el uso no está admitido; se considera terminado cuando el comportamiento está cubierto y coincide con el resultado elegido.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Given an interface and a type, both of which have the @annotate directive placed on them, annotations are only generated for the GraphQL type.
For example (you can also find it as a cloneable repo):
interface TestInterface @annotate(name: "com.example.badinterfacegeneration.TestAnnotation") {
name: String! @annotate(name: "com.example.badinterfacegeneration.TestAnnotation", target: "get")
}
type TestType @annotate(name: "com.example.badinterfacegeneration.TestAnnotation") {
name: String! @annotate(name: "com.example.badinterfacegeneration.TestAnnotation", target: "get")
}
generates the following class:
@TestAnnotation
public class TestType {
private String name;
public TestType() {
}
public TestType(String name) {
this.name = name;
}
@TestAnnotation
public String getName() {
return name;
}
// ... the rest of the generated code
}
and interface:
public interface TestInterface {
String getName();
void setName(String name);
}
The Interface does not have any annotations despite having them defined in the GraphQL schema. This is not the behaviour I expect. There should either be an error that indicates that annotations cannot be placed on interfaces or annotations should be placed on the generated interface.
I don't know how feasible this feature is to implement. If it is not possible, an addition to the documentation or a warning during generation would be nice.
- Lenguaje dominante
- Kotlin
- Estrellas
- 220
- Forks
- 123
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 Netflix/dgs-codegen
-
Integer default values on `Float` input fields generate code that does not compile (Java and Kotlin)Posiblemente ocupada @0z5a la tomó hace 9 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Netflix/dgs-codegen#1015 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Netflix/dgs-codegen#1002 ·
Los mantenedores suelen responder en 1 día
-
Object literal default value on a custom scalar fails with NoSuchElementExceptionPosiblemente ocupada @nboisnea la tomó hace 49 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Netflix/dgs-codegen#982 ·
Los mantenedores suelen responder en 1 día
-
HV000271: Using @Valid on a container (java.util.List) is deprecated. You should apply the annotation on the type argument(s).Posiblemente ocupada @jiholee17 la tomó hace 73 días. Abiertoenhancement
Netflix/dgs-codegen#954 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Support Immutable java Data TypesQuizá libre de nuevo @jiholee17 la tomó hace 184 días y no hay ningún pull request abierto. Abiertoenhancement
Netflix/dgs-codegen#944 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Netflix/dgs-codegen
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
DojoCodingLabs/hermit#23 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
signalapp/Signal-Android#15148 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
PranshulGG/WeatherMaster#1266 · 3 comentarios ·
Los mantenedores suelen responder en 1 día