File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
graphql-kotlin-schema-generator/src/main/kotlin/com/expediagroup/graphql/generator Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,12 @@ open class SchemaGenerator(internal val config: SchemaGeneratorConfig) {
9090 * This function is recursive because while generating the additionalTypes it is possible to create additional types that need to be processed.
9191 */
9292 protected open fun generateAdditionalTypes (): Set <GraphQLType > {
93- val currentlyProcessedTypes = mutableSetOf<KType >()
9493 val graphqlTypes = mutableSetOf<GraphQLType >()
95- do {
96- currentlyProcessedTypes.addAll (this .additionalTypes)
94+ while ( this .additionalTypes.isNotEmpty()) {
95+ val currentlyProcessedTypes = LinkedHashSet (this .additionalTypes)
9796 this .additionalTypes.clear()
9897 graphqlTypes.addAll(currentlyProcessedTypes.map { generateGraphQLType(this , it) })
99- currentlyProcessedTypes.clear()
100- } while (this .additionalTypes.isNotEmpty())
98+ }
10199
102100 return graphqlTypes.toSet()
103101 }
You can’t perform that action at this time.
0 commit comments