Azure / Azure/data-api-builder

enhancement: CLI should generate the entities in dab-config using the provided schema file for Cosmos

Offen
#833 0 Kommentare 0 Reaktionen 2 zugewiesene Personen Beansprucht von @sajeetharan Auf GitHub ansehen
cli cosmos
Vorherrschende Sprache
C#
Sterne
1.5k
Forks
370
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
9

Beschreibung

When we do a dab init, for cosmos db , it is mandatory to provide a schema file as input. The schema file generally contains entities required.
**Current behaviour:**
We need to do a dab add again to add the same entities to the dab-config file.
As gql is case sensitive, there could be errors in casing of entity names between schema file and same entities added using dab add

_Example:_
schema.gql
```
...
type Character @model(name:"Character") {
id : ID,
name : String,
type: String,
homePlanet: Int,
primaryFunction: String
}
...
```
And then possible manual error when we add the same entities to config,
`dab add character ...`

Because of the case difference between `Character` and `character`, the dab engine fails to perform operations.

Note: This is a behavior we have seen occurring commonly, and also got similar feedback from initial customers

**Proposed enhancement:**
- When we input the schema file to the `dab init` command, it should generate the corresponding entities in the dab-config file to avoid manual errors and this also enhances the user experience.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.