@@ -253,36 +253,16 @@ internal class SchemaClassScanner(
253253
254254 private fun scanResolverInfoForPotentialMatches (type : ObjectTypeDefinition , resolverInfo : ResolverInfo ) {
255255 type.getExtendedFieldDefinitions(extensionDefinitions).forEach { field ->
256- // val searchField = applyDirective(field)
257256 val fieldResolver = fieldResolverScanner.findFieldResolver(field, resolverInfo)
258257
259258 fieldResolversByType.getOrPut(type) { mutableMapOf () }[fieldResolver.field] = fieldResolver
260259
261260 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 {
268261 handleFoundType(typeClassMatcher.match(potentialMatch))
269- // }
270262 }
271263 }
272264 }
273265
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-
286266 private fun handleFoundType (match : TypeClassMatcher .Match ) {
287267 when (match) {
288268 is TypeClassMatcher .ScalarMatch -> {
0 commit comments