@@ -3,7 +3,6 @@ package com.coxautodev.graphql.tools
3
3
import com.coxautodev.graphql.tools.SchemaParserOptions.GenericWrapper
4
4
import com.esotericsoftware.reflectasm.MethodAccess
5
5
import com.fasterxml.jackson.core.type.TypeReference
6
- import graphql.TrivialDataFetcher
7
6
import graphql.execution.batched.Batched
8
7
import graphql.language.FieldDefinition
9
8
import graphql.language.ListType
@@ -117,17 +116,7 @@ internal class MethodFieldResolver(field: FieldDefinition, search: FieldResolver
117
116
return if (batched) {
118
117
BatchedMethodFieldResolverDataFetcher (getSourceResolver(), this .method, args, options)
119
118
} else {
120
- if (args.size == 0
121
- && this .method.parameterCount == 0
122
- && this .method.name.startsWith(" get" )
123
- && this .search.type is java.lang.Class <* >
124
- && (this .search.type as java.lang.Class <* >).getMethod(this .method.getName()) != null
125
- ) {
126
- TrivialMethodFieldResolverDataFetcher (getSourceResolver(), this .method, args, options)
127
- } else {
128
- MethodFieldResolverDataFetcher (getSourceResolver(), this .method, args, options)
129
- }
130
-
119
+ MethodFieldResolverDataFetcher (getSourceResolver(), this .method, args, options)
131
120
}
132
121
}
133
122
@@ -232,10 +221,6 @@ open class MethodFieldResolverDataFetcher(private val sourceResolver: SourceReso
232
221
}
233
222
}
234
223
235
- open class TrivialMethodFieldResolverDataFetcher (private val sourceResolver : SourceResolver , method : Method , private val args : List <ArgumentPlaceholder >, private val options : SchemaParserOptions ) : MethodFieldResolverDataFetcher(sourceResolver, method, args, options), TrivialDataFetcher<Any> {
236
-
237
- }
238
-
239
224
private suspend inline fun MethodAccess.invokeSuspend (target : Any , methodIndex : Int , args : Array <Any ?>): Any? {
240
225
return suspendCoroutineUninterceptedOrReturn { continuation ->
241
226
invoke(target, methodIndex, * args + continuation)
0 commit comments