Fetch DataLoader with nullable value #2288
AyushChaubey
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
The data loader can have nullable value types. With jspecify now incorporated in Spring Boot 4 and
graphql-java, nullability is enforced strictly.After doing Spring Boot 4 and DGS 11.1.0 upgrade, we started to get compilation errors at the point where we try to fetch the DataLoader using this function.
DGS has the following signature of the
getDataLoaderfunction, where the value is non-nullable-fun <K : Any, V : Any> getDataLoader(loaderClass: Class<*>): DataLoader<K, V>The corresponding function in
graphql-javahas the value as nullable -public <K, V extends @Nullable Object> @Nullable DataLoader<K, V> getDataLoader(String dataLoaderName)Can we please make the DGS's
getDataLoaderalso have the nullable value types ?Beta Was this translation helpful? Give feedback.
All reactions