Open jmartisk opened 2 months ago
….and it should not be a warning, should it?
Hmm you're not the first person pointing this out, but I disagree, because it means that the framework has decided to override something that the user wrote (the user added NonNull
but we still make it nullable in the end)
Hmmm... you're right. Then we should make it an error and fail the deployment, if a @NonNull
is combined with a @DefaultValue
, shouldn't we?
That makes sense. @gsmet would you agree, since you're the first person who brought this up?
FWIW, if you make it an error, I think the Quarkus CI will fail, given I found out about this message in the Quarkus CI. Well, except we have a bug that won't trigger the codestarts test as the dependencies are not properly declared.
But that might be a good way to find out who the culprit is.
Ideally, do the change, deploy a snapshot of SmallRye GraphQL, update the Quarkus BOM, build the entire Quarkus tree and try running mvn -f integration-tests/devtools clean verify
.
This is where I got this thing: one of the codestarts test somehow triggers it but I wasn't able to reproduce it by isolating a specific test.
You have an example of the warning here: https://github.com/quarkusio/quarkus/actions/runs/10710128172/job/29696739970 . Look for NonNull
in the logs.
Ah crap, it seems a class from the TCK uses this: https://github.com/eclipse/microprofile-graphql/blob/main/server/tck/src/main/java/org/eclipse/microprofile/graphql/tck/apps/superhero/model/Item.java#L156 so it breaks the TCKs completely, because the schema won't build at all.. And I don't think we can easily work around this.
Crap. Maybe we can sneak a bugfix release in? @phillip-kruger ?
To make the message a bit more useful, we should attach some info saying which argument this is related to, This message is logged by
io.smallrye.graphql.schema.helper.NonNullHelper