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
Copy file name to clipboardExpand all lines: src/main/kotlin/com/coxautodev/graphql/tools/FieldResolverScanner.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
145
145
146
146
val sourceName =if (field.sourceLocation !=null&& field.sourceLocation.sourceName !=null) field.sourceLocation.sourceName else"<unknown>"
147
147
val sourceLocation =if (field.sourceLocation !=null) "$sourceName:${field.sourceLocation.line}"else"<unknown>"
148
-
return"No method${if (scannedProperties) " or field"else""} found as defined in $sourceLocation with any of the following signatures (with or without one of $allowedLastArgumentTypes as the last argument), in priority order:\n${signatures.joinToString("\n")}"
148
+
return"No method${if (scannedProperties) " or field"else""} found as defined in schema $sourceLocation with any of the following signatures (with or without one of $allowedLastArgumentTypes as the last argument), in priority order:\n${signatures.joinToString("\n")}"
@@ -19,7 +23,7 @@ internal class TypeClassMatcher(private val definitionsByName: Map<String, TypeD
19
23
privatefunerror(potentialMatch:PotentialMatch, msg:String) =SchemaClassScannerError("Unable to match type definition (${potentialMatch.graphQLType}) with java type (${potentialMatch.javaType}): $msg")
20
24
21
25
funmatch(potentialMatch:PotentialMatch): Match {
22
-
returnif(potentialMatch.batched) {
26
+
returnif(potentialMatch.batched) {
23
27
match(stripBatchedType(potentialMatch)) // stripBatchedType sets 'batched' to false
throw error(potentialMatch, "Java class is not a List or generic type information was lost: $realType")
80
84
}
81
85
}
82
86
83
87
isTypeName-> {
84
-
val typeDefinition =ScalarInfo.STANDARD_SCALAR_DEFINITIONS[graphQLType.name] ?: definitionsByName[graphQLType.name] ?:throw error(potentialMatch, "No ${TypeDefinition::class.java.simpleName} for type name ${graphQLType.name}")
85
-
if(typeDefinition isScalarTypeDefinition) {
88
+
val typeDefinition =ScalarInfo.STANDARD_SCALAR_DEFINITIONS[graphQLType.name]
89
+
?: definitionsByName[graphQLType.name]
90
+
?:throw error(potentialMatch, "No ${TypeDefinition::class.java.simpleName} for type name ${graphQLType.name}")
throwRawClassRequiredForGraphQLMappingException("Type ${TypeUtils.toString(type)} cannot be mapped to a GraphQL type! Since GraphQL-Java deals with erased types at runtime, only non-parameterized classes can represent a GraphQL type. This allows for reverse-lookup by java class in interfaces and union types.")
// throw RawClassRequiredForGraphQLMappingException("Type ${TypeUtils.toString(type)} cannot be mapped to a GraphQL type! Since GraphQL-Java deals with erased types at runtime, only non-parameterized classes can represent a GraphQL type. This allows for reverse-lookup by java class in interfaces and union types.")
0 commit comments