Skip to content

Commit a795b41

Browse files
gscheibeldariuszkuc
authored andcommitted
Prevent polymorphic implementations from being overly cached (#64)
1 parent ed0fde8 commit a795b41

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/main/kotlin/com/expedia/graphql/schema/generator/SchemaGenerator.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,7 @@ internal class SchemaGenerator(
291291
.filterNot { it.kotlin.isAbstract }
292292
.forEach {
293293
val objectType = objectType(it.kotlin, interfaceType)
294-
val key = TypesCacheKey(it.kotlin.createType(), false)
295294

296-
state.cache.put(key, KGraphQLType(it.kotlin, objectType))
297295
if (objectType !is GraphQLTypeReference) {
298296
state.additionalTypes.add(objectType)
299297
}
@@ -326,7 +324,6 @@ internal class SchemaGenerator(
326324
builder.possibleType(objectType as GraphQLObjectType)
327325
}
328326

329-
state.cache.put(key, KGraphQLType(it.kotlin, objectType))
330327
if (state.cache.doesNotContain(it.kotlin)) {
331328
state.cache.put(key, KGraphQLType(it.kotlin, objectType))
332329
}

0 commit comments

Comments
 (0)