You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val genericParameterType =this.getJavaMethodParameterType(index) ?:throwResolverError("Missing method type at position ${this.getJavaMethodParameterIndex(index)}, this is most likely a bug with graphql-java-tools")
60
+
val genericParameterType =this.getJavaMethodParameterType(index)
61
+
?:throwResolverError("Missing method type at position ${this.getJavaMethodParameterIndex(index)}, this is most likely a bug with graphql-java-tools")
61
62
62
63
val isNonNull = definition.type isNonNullType
63
64
val isOptional =this.genericType.getRawClass(genericParameterType) ==Optional::class.java
64
65
65
-
val typeReference =object:TypeReference<Any>() {
66
+
val typeReference =object:TypeReference<Any>() {
66
67
overridefungetType() = genericParameterType
67
68
}
68
69
69
70
args.add { environment ->
70
-
val value = environment.arguments[definition.name] ?:if(isNonNull) {
71
+
val value = environment.arguments[definition.name] ?:if(isNonNull) {
71
72
throwResolverError("Missing required argument with name '${definition.name}', this is most likely a bug with graphql-java-tools")
72
73
} else {
73
74
null
74
75
}
75
76
76
-
if(value ==null&& isOptional) {
77
+
if(value ==null&& isOptional) {
77
78
return@add Optional.empty<Any>()
78
79
}
79
80
@@ -82,16 +83,16 @@ internal class MethodFieldResolver(field: FieldDefinition, search: FieldResolver
82
83
}
83
84
84
85
// Add DataFetchingEnvironment/Context argument
85
-
if(this.additionalLastArgument) {
86
+
if(this.additionalLastArgument) {
86
87
val lastArgumentType =this.method.parameterTypes.last()
87
-
when(lastArgumentType) {
88
+
when(lastArgumentType) {
88
89
null->throwResolverError("Expected at least one argument but got none, this is most likely a bug with graphql-java-tools")
0 commit comments