hasura / hasura/graphql-engine

Custom name for Enums still not possible

Open
#8,400 0 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.6.0-beta.1

### What is the expected behaviour?

Have the ability to set a custom enum name in the metadata and not have it changed by Hasura.

for example, making the custom enum name `Country` should amor be converted to `Country_enum`

Opening this ticket as requested in this comment https://github.com/hasura/graphql-engine/issues/8308#issuecomment-1097886419

### Keywords

Enum

### What is the current behaviour?

the `_enum` string is always suffixed

### Any possible solutions?

Just remove the suffix if there is a custom name.

### Can you identify the location in the source code where the problem exists?

Yes

### If the bug is confirmed, would you be willing to submit a PR?

Yes

Contributor guide

Open the contributing guide

Research direction

No source file or test is named in the issue. Start by tracing how enum names from metadata are generated and where the `_enum` suffix is added; verify the behavior with a regression test showing that a custom name such as `Country` remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.