hasura / hasura/graphql-engine
Server: Naming convention should not change casing of custom enum values
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.10.1
### Environment
Cloud/ OSS
### What is the current behaviour?
Currently setting naming convention of `graphql-default` will enforce casing of enums, including custom enums.
### What is the expected behaviour?
Naming convention should only affect built-in enums, not custom user enums.
### How to reproduce the issue?
1. Create and track an enum table `CREATE TABLE (name TEXT PRIMARY KEY);`
2. Insert a value into this table, make sure it is lowercased.
3. Set this table as an enum.
4. Set `HASURA_GRAPHQL_EXPERIMENTAL_FEATURES=naming_convention`
5. Set the naming convention `graphql-default`
6. The enum variant is uppercased.
### Any possible solutions?
Avoiding the graphql-default naming convention
### Related issues
This was likely introduced in #8640
Contributor guide
Research direction
Start by reproducing the enum behavior described in this issue with the graphql-default naming convention, then compare the change introduced in #8640. Done means custom user enum values retain their stored casing while the naming convention continues to affect built-in enums.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgres
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100