You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/generators/java/ClientApiGeneratorv2.kt
+5-4
Original file line number
Diff line number
Diff line change
@@ -402,23 +402,24 @@ class ClientApiGeneratorv2(private val config: CodeGenConfig, private val docume
402
402
val rootRef =if (javaType.build().name == rootType.name) "this"else"getRoot()"
403
403
val rootTypeName =if (javaType.build().name == rootType.name) "${rootType.name}<PARENT, ROOT>"else"ROOT"
404
404
val parentRef = javaType.build().name
405
-
val projectionName ="${it.name.capitalized()}Projection"
406
-
val typeVariable =TypeVariableName.get("$projectionName<$parentRef<PARENT, ROOT>, $rootTypeName>")
405
+
val projectionName ="${it.name.capitalized()}Fragment"
406
+
val fullProjectionName ="${projectionName}Projection"
407
+
val typeVariable =TypeVariableName.get("$fullProjectionName<$parentRef<PARENT, ROOT>, $rootTypeName>")
407
408
javaType.addMethod(
408
409
MethodSpec.methodBuilder("on${it.name}")
409
410
.addModifiers(Modifier.PUBLIC)
410
411
.returns(typeVariable)
411
412
.addCode(
412
413
"""
413
-
|$projectionName<$parentRef<PARENT, ROOT>, $rootTypeName> fragment = new $projectionName<>(this, $rootRef);
414
+
|$fullProjectionName<$parentRef<PARENT, ROOT>, $rootTypeName> fragment = new $fullProjectionName<>(this, $rootRef);
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-core/src/test/kotlin/com/netflix/graphql/dgs/codegen/clientapiv2/ClientApiGenFragmentTestv2.kt
+54-8
Original file line number
Diff line number
Diff line change
@@ -61,12 +61,12 @@ class ClientApiGenFragmentTestv2 {
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-core/src/test/kotlin/com/netflix/graphql/dgs/codegen/clientapiv2/ClientApiGenProjectionTestv2.kt
+3-3
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ class ClientApiGenProjectionTestv2 {
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-core/src/test/kotlin/com/netflix/graphql/dgs/codegen/clientapiv2/ClientApiGenQueryTestv2.kt
+4-4
Original file line number
Diff line number
Diff line change
@@ -210,8 +210,8 @@ class ClientApiGenQueryTestv2 {
0 commit comments