hasura / hasura/graphql-engine

Alphabetical ordering of properties in exported yaml files not working

Open
#8,743 0 comments 1 reaction 0 assignees View on GitHub
c/cli k/bug t/product-platform
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version:
CLI Version (for CLI related issue): 2.9.0 (tried 2.8.0 as well)

### Environment

Cloud

### What is the current behaviour?

Running hasura console and changing permission on the table regenerates a yaml file with object properties sorted randomly

### What is the expected behaviour?

Object properties should be sorted alphabetically as per the changelog

### How to reproduce the issue?

1. Run the console
2. Change permissions on any of the tables to regenerate yaml file(s)
3. Regenerated files have properties in a "random", non-alphabetical order

### Screenshots or Screencast

This is just a simple example, but I would expect `name` to come first here

![image](https://user-images.githubusercontent.com/2056251/182895975-ea16fe6d-d80e-4050-b56f-ee8de94802f0.png)

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

Yes

### Keywords

cli order, alphabetically

Contributor guide

Open the contributing guide

Research direction

Start with the hasura console workflow described in the reproduction and inspect the regenerated YAML files after changing table permissions. Compare the property ordering with the expected alphabetical order, and consider the issue complete when regenerated files consistently preserve that ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
cli
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.