@@ -20,7 +20,6 @@ import kotlinx.coroutines.ensureActive
2020import kotlinx.coroutines.future.future
2121import org.apache.commons.lang3.reflect.TypeUtils
2222import org.reactivestreams.Publisher
23- import org.slf4j.LoggerFactory
2423import java.lang.reflect.InvocationTargetException
2524import java.lang.reflect.Method
2625import java.util.*
@@ -41,8 +40,6 @@ internal class MethodFieldResolver(
4140 private val scalarNames : Set <String >
4241) : FieldResolver(field, search, options) {
4342
44- private val log = LoggerFactory .getLogger(javaClass)
45-
4643 private val isSuspendFunction = method.isSuspendFunction()
4744 private val numberOfParameters = method.parameterCountWithoutContinuation()
4845
@@ -105,21 +102,7 @@ internal class MethodFieldResolver(
105102 val firstTrailingParameter = field.inputValueDefinitions.size + search.firstArgumentIndex
106103 method.parameterTypes.slice(firstTrailingParameter until numberOfParameters).forEach { parameterType ->
107104 when (parameterType) {
108- options.contextClass -> args.add { environment ->
109- val context: Any? = environment.graphQlContext[options.contextClass]
110- if (context != null ) {
111- context
112- } else {
113- log.warn(
114- " Generic context class has been deprecated by graphql-java. " +
115- " To continue using a custom context class as the last parameter in resolver methods " +
116- " please insert it into the GraphQLContext map when building the ExecutionInput. " +
117- " This warning will become an error in the future."
118- )
119- @Suppress(" DEPRECATION" )
120- environment.getContext() // TODO: remove deprecated use in next major release
121- }
122- }
105+ options.contextClass -> args.add { environment -> environment.graphQlContext[options.contextClass] }
123106
124107 GraphQLContext ::class .java -> args.add { environment -> environment.graphQlContext }
125108 else -> args.add { environment -> environment }
0 commit comments