Skip to content

Commit b870920

Browse files
committed
Use the type name for the connection as defined in the schema
1 parent 44c9de4 commit b870920

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/main/kotlin/com/coxautodev/graphql/tools/SchemaParserBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class SchemaParserBuilder constructor(private val dictionary: SchemaParserDictio
167167

168168
private fun appendDynamicDefinitions(baseDefinitions: List<Definition<*>>): List<Definition<*>> {
169169
val definitions = baseDefinitions.toMutableList()
170-
options.typeDefinitionFactories.forEach { definitions.addAll(it.create(baseDefinitions)) }
170+
options.typeDefinitionFactories.forEach { definitions.addAll(it.create(definitions)) }
171171
return definitions.toList()
172172
}
173173

src/main/kotlin/com/coxautodev/graphql/tools/TypeDefinitionFactory.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
public interface TypeDefinitionFactory {
88

9+
/**
10+
* Called after parsing the SDL for creating any additional type definitions.
11+
* All existing definitions are passed in. Return only the newly created definitions.
12+
*
13+
* @param existing all existing definitions
14+
* @return any new definitions that should be added
15+
*/
916
List<Definition<?>> create(final List<Definition<?>> existing);
1017

1118
}

0 commit comments

Comments
 (0)