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