graphql-java 22.1 added nullability annotations to DataFetchingEnvironment methods such as getSource, which can make make the call-site overly verbose from Kotlin since the caller must handle the possibility of null. In this particular case, the method always returns a non-null value unless being called from the context of the root query, so having a helper that returns a non-null value is more ergonomic.
graphql-java 22.1 added nullability annotations to DataFetchingEnvironment methods such as getSource, which can make make the call-site overly verbose from Kotlin since the caller must handle the possibility of null. In this particular case, the method always returns a non-null value unless being called from the context of the root query, so having a helper that returns a non-null value is more ergonomic.