dotansimha / dotansimha/graphql-code-generator

[typescript] Opt out of suffix for enum value keys

Open
#6,499 2 comments 2 reactions 0 assignees View on GitHub
core help wanted kind/enhancement
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

**Is your feature request related to a problem? Please describe.**
It's a bit odd that suffixes are applied to enum values in addition to the enum itself (when using `typesSuffix`):
```
export enum RoleSuffix {
UserSuffix = 'USER',
AdminSuffix = 'ADMIN'
}
```
Normally the suffix is useful to disambiguate the overall type when importing and using it in files, but there is not much benefit to having a suffix on the values themselves in most cases (`UserSuffix`, for example).

**Describe the solution you'd like**
Add a flag to opt out of this behavior. `suffixEnumValues` `true/false`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.