@NotNull instead of @GraphQLNonNull
See original GitHub issueHi there!
Would be possible to allow graphql-spqr
to work with @NotNull
the same it works with @GraphQLNonNull
? It would improve code readability, increase code compatibility with 3rd party validation tools, and would reduce code verbosity.
We have a lot of not null on our graphql/service methods, so this would help a lot.
Best regards, Rafael Pacheco.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Enforcing non-nullability - Apollo GraphQL Docs
Using the @nonnull directive Because GraphQL allows very granular error handling and resolvers may return errors on different fields during execution, many ...
Read more >When To Use GraphQL Non-Null Fields | by Caleb Meredith
A GraphQL non-null field is a GraphQL field where the type is non-null. ... non-null locally instead of globally at a GraphQL schema...
Read more >Return only non-null values from GraphQLList object
Is there a way to just return " title " or " description " only if it not null? Current result of the...
Read more >Nulls in GraphQL: Cheatsheet - Hasura
Nullability in GraphQL is a controversial topic. Some say constant null checks are a nuisance, while others err on the side of paranoia....
Read more >GraphQLNonNull(GraphQLBoolean) could return null #438
So it looks like that GraphQLNonNull checks that the datafetcher's returned object is not null, which it isn't.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup, it does 😃 Both
@NotNull
and@NonNull
work, and so do the JetBrains annotations.Yup, I see how this can easily lead to confusion…
There are ways to still take method annotations into account, with some customization, but if upgrading javax.validation is an option, I’d still go for that.