Open robp94 opened 1 month ago
I guess this is just another variation on https://github.com/smallrye/smallrye-graphql/issues/1366 We've made some progress in scanning generic types, but apparently there are still some gaps.
Most importantly, I think we do not yet support wrapper directives (and constraints directives via bean validation). I have started to work on the feature, but it will take some time to implement.
For #1366, the problem was that if the type argument contained @NonNull
, every wrapper was non-null.
See:
https://github.com/smallrye/smallrye-graphql/blob/ba3cf915b94b169112f599b011eaab3febb79974/common/schema-builder/src/main/java/io/smallrye/graphql/schema/creator/WrapperCreator.java#L80
List<Set<Collection<@NonNull Integer>>> => [[[Int!]!]!]!
List<Set<@NonNull Collection<Integer>>> => [[[Int]]]
I might have fixed the issue locally, but I still need to test it...
If I have a class like this:
I get a schema like this:
For the type of the list, the constraint is not in the schema. Constraints for the list like max/min length do work.