dotansimha / dotansimha/graphql-code-generator
enum on directive with enumPrefix to false still adds prefix
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
```
typescript
```
### Describe the bug
Enums on directives: These are generated doesn’t take the enumPrefix configuration into account.
### Your Example Website or App
### Steps to Reproduce the Bug or Issue
## Here is the example
```
directive @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE
enum CacheControlScope {
PUBLIC
PRIVATE
}
```
### generated code
```
export enum CacheControlScope {
Private = 'PRIVATE',
Public = 'PUBLIC'
}
export type ICacheControlDirectiveArgs = {
maxAge?: Maybe;
scope?: Maybe;
};
```
### Expected behavior
expected below
```
export type ICacheControlDirectiveArgs = {
maxAge?: Maybe;
scope?: Maybe;
};
```
### Screenshots or Videos
_No response_
### Platform
- OS: [e.g. macOS, Windows, Linux]
- NodeJS: [e.g. 18.5.0]
- `graphql` version: [e.g. 16.3.0]
```
"@graphql-codegen/add": "^5.0.3",
"@graphql-codegen/cli": "^5.0.4",
"@graphql-codegen/fragment-matcher": "^5.1.0",
"@graphql-codegen/typescript": "^4.1.3",
"@graphql-codegen/typescript-operations": "^4.4.1",
"@graphql-codegen/typescript-resolvers": "^4.4.2"
```
### Codegen Config File
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.