@@ -253,36 +253,16 @@ internal class SchemaClassScanner(
253
253
254
254
private fun scanResolverInfoForPotentialMatches (type : ObjectTypeDefinition , resolverInfo : ResolverInfo ) {
255
255
type.getExtendedFieldDefinitions(extensionDefinitions).forEach { field ->
256
- // val searchField = applyDirective(field)
257
256
val fieldResolver = fieldResolverScanner.findFieldResolver(field, resolverInfo)
258
257
259
258
fieldResolversByType.getOrPut(type) { mutableMapOf () }[fieldResolver.field] = fieldResolver
260
259
261
260
fieldResolver.scanForMatches().forEach { potentialMatch ->
262
- // if (potentialMatch.graphQLType is TypeName && !definitionsByName.containsKey((potentialMatch.graphQLType.name))) {
263
- // val typeDefinition = ObjectTypeDefinition.newObjectTypeDefinition()
264
- // .name(potentialMatch.graphQLType.name)
265
- // .build()
266
- // handleFoundType(TypeClassMatcher.ValidMatch(typeDefinition, typeClassMatcher.toRealType(potentialMatch), potentialMatch.reference))
267
- // } else {
268
261
handleFoundType(typeClassMatcher.match(potentialMatch))
269
- // }
270
262
}
271
263
}
272
264
}
273
265
274
- // private fun applyDirective(field: FieldDefinition): FieldDefinition {
275
- // val connectionDirectives = field.directives.filter { it.name == "connection" }
276
- // if (connectionDirectives.isNotEmpty()) {
277
- // val directive = connectionDirectives.first()
278
- // val originalType:TypeName = field.type as TypeName
279
- // val wrappedField = field.deepCopy()
280
- // wrappedField.type = TypeName(originalType.name + "Connection")
281
- // return wrappedField
282
- // }
283
- // return field
284
- // }
285
-
286
266
private fun handleFoundType (match : TypeClassMatcher .Match ) {
287
267
when (match) {
288
268
is TypeClassMatcher .ScalarMatch -> {
0 commit comments