hasura / hasura/graphql-engine

Naming convention for field names in

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

Description

### Version Information

Server Version: 2.15

### Environment

Any

### What is the current behaviour?

Newly added aggregate where filtering functionality is using upper case X and Y as field names on _aggregate_bool_exp_corr_argument and _aggregate_bool_exp_covar_samp_arguments .

Is there a reason upper case X and Y were used here as opposed to lower case x and y, or maybe _x, _y?

Along with jsonb_cast_exp String field, these are the only 3 Hasura generated fields that do not adhere to the all lower case naming Hasura uses. Since we lint our schema to enforce naming standards, these new additions were caught.
### What is the expected behaviour?

The field names should be lower case and also have an `_` as typically fields in Hasura that take scalar values do so.

Note: this will be a **breaking change**.

### How to reproduce the issue?

Set up a schema and required relationships to test https://hasura.io/docs/latest/queries/postgres/query-filters/#filter-based-on-aggregations-of-nested-array-fields. Go to explorer in Graphiql and check out the field names.

### Screenshots or Screencast
Screenshot 2022-11-17 at 12 13 34 PM

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

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

### Keywords

Contributor guide

Open the contributing guide

Research direction

Reproduce the aggregation filter schema using the linked Hasura documentation, then inspect the generated fields in the GraphiQL explorer. Confirm where the uppercase X and Y fields and jsonb_cast_exp are produced; done means the generated names follow the lower-case and underscore convention without leaving the documented aggregation fields inconsistent.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.