File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
graphql-kotlin-toolkit-codegen/src/main/kotlin/com/auritylab/graphql/kotlin/toolkit/codegen/mapper Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.auritylab.graphql.kotlin.toolkit.codegen.mapper
22
33import com.auritylab.graphql.kotlin.toolkit.codegen.CodegenOptions
44import com.auritylab.graphql.kotlin.toolkit.codegen.helper.NamingHelper
5+ import com.auritylab.graphql.kotlin.toolkit.codegen.helper.lowercaseFirst
56import com.squareup.kotlinpoet.ClassName
67import com.squareup.kotlinpoet.MemberName
78import graphql.schema.GraphQLEnumType
@@ -57,8 +58,16 @@ internal class GeneratedMapper(
5758 /* *
5859 * Will return the [MemberName] of the builder method for the given [inputObject].
5960 */
60- fun getInputObjectBuilderMemberName (inputObject : GraphQLInputObjectType ): MemberName =
61- MemberName (getGeneratedTypeClassName(inputObject).addSimpleNames(" Companion" ), " buildByMap" )
61+ fun getInputObjectBuilderMemberName (inputObject : GraphQLInputObjectType ): MemberName {
62+ val uppercaseInputObject = inputObject.name.lowercaseFirst()
63+ val joinedMethodNamed = uppercaseInputObject + " BuildByMap"
64+
65+ // Build the MemberName for with the joined method name as actual method name.
66+ return MemberName (
67+ getGeneratedTypeClassName(inputObject).addSimpleNames(" Companion" ),
68+ joinedMethodNamed
69+ )
70+ }
6271
6372 /* *
6473 * Will return the [MemberName] which points to a string which contains the name of the container for the given field resolver.
You can’t perform that action at this time.
0 commit comments