Skip to content

Commit 0bc7baf

Browse files
committed
Allow mutating existing definitions
This is a temporary fix. Should be fully fixed by #362.
1 parent 33b308c commit 0bc7baf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ interface TypeDefinitionFactory {
1212
*
1313
* @return any new definitions that should be added
1414
*/
15-
fun create(existing: List<Definition<*>>): List<Definition<*>>
15+
fun create(existing: MutableList<Definition<*>>): List<Definition<*>>
1616
}

src/main/kotlin/graphql/kickstart/tools/relay/RelayConnectionFactory.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import graphql.language.*
55

66
class RelayConnectionFactory : TypeDefinitionFactory {
77

8-
override fun create(existing: List<Definition<*>>): List<Definition<*>> {
8+
override fun create(existing: MutableList<Definition<*>>): List<Definition<*>> {
99
val definitions = mutableListOf<Definition<*>>()
1010
val definitionsByName = existing.filterIsInstance<TypeDefinition<*>>()
1111
.associateBy { it.name }

0 commit comments

Comments
 (0)