Skip to content

Remove implicit adding of Input suffix #3998

@vsfedorenko

Description

@vsfedorenko

baseType: `${this.convertName(schemaType.name)}Input`,

Hi, I am developing a Java / Kotlin solution. And my problem is that I can't use Input endings in my schema for the input types because codegen utility translates input type names into SomeNameInputInput.
So, generally speaking, it duplicates the Input ending.

Can you make this optional? Or add some logic that checks "if type ends with Input word, then do not add additional Input word"?

Steps to reproduce:

  1. Open https://graphql-code-generator.com/
  2. Select Java --> Types (Enum & Input) in dropdown
  3. Put this in the textarea on the left side
input CreateUserInput {
   userName: CreateUserNameInput
}

input CreateUserNameInput {
  given: String!
  family: String!
}
  1. Find CreateUserNameInputInput in the right side textarea

Metadata

Metadata

Assignees

Labels

pluginswaiting-for-releaseFixed/resolved, and waiting for the next stable release

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions