@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.
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):
generates the following class:
and interface:
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.