hasura / hasura/graphql-engine

Field names overriding with graphql-default always force case format

Open
#9,215 0 comments 0 reactions 0 assignees View on GitHub
k/bug t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.15.0
CLI Version (for CLI related issue): 2.15.0

### Environment

OSS

### What is the current behaviour?

When you run the engine with the graphql-default naming convention if you override a field name it will be automatically transformed in snakeCase

### What is the expected behaviour?

An onverrided field name should not be touched

### How to reproduce the issue?

1. start the engine with the graphql-default naming convention
2. create a table
3. create a field called my_field
4. override its name to my_field
5. go in the API view and check the field name. It will be myField instead of the overridden value

### Screenshots or Screencast

![image](https://user-images.githubusercontent.com/2777256/202165866-bbfd73f6-4f2b-4a58-818f-b07cab03d687.png)
![image](https://user-images.githubusercontent.com/2777256/202165973-234251f7-9ffa-43ca-9a9e-c184143a4547.png)

### Please provide any traces or logs that could help here.

### Any possible solutions/workarounds you're aware of?

### Keywords
naming convention override field name case

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior using the graphql-default naming convention, an overridden field name, and the API view described in the issue. Trace the naming-convention handling from that reproduction and verify that the API preserves the explicitly overridden field name rather than converting it to camelCase.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.