@@ -35,7 +35,12 @@ internal class MethodFieldResolver(field: FieldDefinition, search: FieldResolver
3535 }
3636 }
3737
38- private val additionalLastArgument = method.kotlinFunction?.valueParameters?.size ? : method.parameterCount == (field.inputValueDefinitions.size + getIndexOffset() + 1 )
38+ private val additionalLastArgument =
39+ try {
40+ method.kotlinFunction?.valueParameters?.size ? : method.parameterCount == (field.inputValueDefinitions.size + getIndexOffset() + 1 )
41+ } catch (e: InternalError ) {
42+ method.parameterCount == (field.inputValueDefinitions.size + getIndexOffset() + 1 )
43+ }
3944
4045 override fun createDataFetcher (): DataFetcher <* > {
4146 val batched = isBatched(method, search)
@@ -103,7 +108,7 @@ internal class MethodFieldResolver(field: FieldDefinition, search: FieldResolver
103108
104109 override fun scanForMatches (): List <TypeClassMatcher .PotentialMatch > {
105110 val batched = isBatched(method, search)
106- val unwrappedGenericType = genericType.unwrapGenericType(method.kotlinFunction?.returnType?.javaType ? : method.genericReturnType)
111+ val unwrappedGenericType = genericType.unwrapGenericType(try { method.kotlinFunction?.returnType?.javaType ? : method.genericReturnType } catch (e : InternalError ) { method.genericReturnType } )
107112 val returnValueMatch = TypeClassMatcher .PotentialMatch .returnValue(field.type, unwrappedGenericType, genericType, SchemaClassScanner .ReturnValueReference (method), batched)
108113
109114 return field.inputValueDefinitions.mapIndexed { i, inputDefinition ->
@@ -140,7 +145,7 @@ open class MethodFieldResolverDataFetcher(private val sourceResolver: SourceReso
140145 // Convert to reflactasm reflection
141146 private val methodAccess = MethodAccess .get(method.declaringClass)!!
142147 private val methodIndex = methodAccess.getIndex(method.name, * method.parameterTypes)
143- private val isSuspendFunction = method.kotlinFunction?.isSuspend == true
148+ private val isSuspendFunction = try { method.kotlinFunction?.isSuspend == true } catch (e : InternalError ) { false }
144149
145150 private class CompareGenericWrappers {
146151 companion object : Comparator <GenericWrapper > {
0 commit comments