Skip to content

Commit cfe4610

Browse files
chore: rename generic function
1 parent 7996b45 commit cfe4610

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ internal class SchemaClassScanner(
7777
do {
7878
do {
7979
// Require all implementors of discovered interfaces to be discovered or provided.
80-
handleInterfaceOrUnionSubTypes(getAllObjectTypesImplementingDiscoveredInterfaces()) { "Object type '${it.name}' implements a known interface, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." }
80+
handleDictionaryTypes(getAllObjectTypesImplementingDiscoveredInterfaces()) { "Object type '${it.name}' implements a known interface, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." }
8181
} while (scanQueue())
8282

8383
// Require all members of discovered unions to be discovered.
84-
handleInterfaceOrUnionSubTypes(getAllObjectTypeMembersOfDiscoveredUnions()) { "Object type '${it.name}' is a member of a known union, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." }
84+
handleDictionaryTypes(getAllObjectTypeMembersOfDiscoveredUnions()) { "Object type '${it.name}' is a member of a known union, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." }
8585
} while (scanQueue())
8686

8787
if (options.includeUnusedTypes) {
@@ -94,7 +94,7 @@ internal class SchemaClassScanner(
9494

9595
val unusedDefinition = unusedDefinitions.first()
9696

97-
handleInterfaceOrUnionSubTypes(listOf(unusedDefinition)) { "Object type '${it.name}' is unused and includeUnusedTypes is true. Please pass a class for type '${it.name}' in the parser's dictionary." }
97+
handleDictionaryTypes(listOf(unusedDefinition)) { "Object type '${it.name}' is unused and includeUnusedTypes is true. Please pass a class for type '${it.name}' in the parser's dictionary." }
9898
} while (scanQueue())
9999
}
100100

@@ -222,7 +222,7 @@ internal class SchemaClassScanner(
222222
}.flatten().distinct()
223223
}
224224

225-
private fun handleInterfaceOrUnionSubTypes(types: List<ObjectTypeDefinition>, failureMessage: (ObjectTypeDefinition) -> String) {
225+
private fun handleDictionaryTypes(types: List<ObjectTypeDefinition>, failureMessage: (ObjectTypeDefinition) -> String) {
226226
types.forEach { type ->
227227
val dictionaryContainsType = dictionary.filter { it.key.name == type.name }.isNotEmpty()
228228
if (!unvalidatedTypes.contains(type) && !dictionaryContainsType) {

0 commit comments

Comments
 (0)