`List<@NonNull String>` should be `[String!]` not `[String!]!`
When I add a @NonNull to the element type of a list, the resulting list still should be nullable.
@GraphQLApi
public class Boundary {
public @Query String foo(List<@NonNull String> strings) {
return "bar";
}
}
But it actually becomes:
type Query {
foo(strings: [String!]!): String
}
When building the model the information about annotations on the argument and its parameters are merged. ArgumentCreator:
public Optional<Argument> createArgument(Operation operation, MethodInfo methodInfo, short position) {
//methodInfo = java.util.List<java.lang.String> foo(java.util.List<@NonNull java.lang.String> list)
Annotations annotationsForThisArgument = Annotations.getAnnotationsForArgument(methodInfo, position);
// annotationsForThisArgument = {org.eclipse.microprofile.graphql.NonNull=@NonNull}
}
So the book keeping needs to be changed to not merge all annotations on the argument and its parameters. I make an attempt at fixing it.
This relates to bug #740 also, as that bug is about Lists nested deeper in the generics structure, and it is related to how is model for GraphQL schema built for collections. At least we have to make sure we do not bring big conflicts when patching this and that bugs.
Ok, I will wait for your work on #740.