Skip to content

Commit

Permalink
Merge pull request #6 from lsafer-meemer/main
Browse files Browse the repository at this point in the history
fix(graphql-java): getter blocks wrong cast
  • Loading branch information
LSafer authored Jun 1, 2023
2 parents 1febf33 + b7ef326 commit a1547a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphql-java/src/main/kotlin/internal/Types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ fun <T : Any> TransformContext.addObjectType(
val allInterfaces = type.generateAllInterfacesSequence().toList()

@Suppress("UNCHECKED_CAST")
val allGetterBlocks = (allInterfaces.map { it.onGetBlocks } + type.onGetBlocks)
val allGetterBlocks = (allInterfaces.flatMap { it.onGetBlocks } + type.onGetBlocks)
as List<GraphQLGetterBlock<T, *>>

@Suppress("UNCHECKED_CAST")
val allGetterBlockingBlocks = (allInterfaces.map { it.onGetBlockingBlocks } + type.onGetBlockingBlocks)
val allGetterBlockingBlocks = (allInterfaces.flatMap { it.onGetBlockingBlocks } + type.onGetBlockingBlocks)
as List<GraphQLGetterBlockingBlock<T, *>>

val allFields = (allInterfaces.flatMap { it.fields } + type.fields)
Expand Down

0 comments on commit a1547a2

Please sign in to comment.