Azure / Azure/data-api-builder
[Enhancement]: new config item to disable plural / SELECT queries against Cosmos DB (allow ReadItemAsync only)
- Lingua principale
- C#
- Stelle
- 1.5k
- Fork
- 370
- Merge medio
- 3g 22h
- PR unite (30g)
- 9
Descrizione
Our use case for Cosmos DB is point reads by id and partition key. We have many containers for different data and many versions of each dataset keyed using partitions. We want to democratise our fancy new graphql endpoint (thanks DAB team!).
However I fret about excessive RU consumption and "rogue" client apps using queries to retrieve what could be returned by `ReadItemAsync`.
My idea is that with a suitable configuration option e.g. `disableNoSQL : true`, we would make `item_by_pk` the only available entity, and the plural `items` would not be publicised in the schema, and any attempt to surreptitiously query `items` would result in a suitable error.
My initial though above was a data source global config item, but it could make more sense, or have less impact on the implementation if it were at the entity level with a magic value of `disabled`. Maybe not the best idea, but you get the gist.
```json
"graphql": {
"enabled": true,
"type": {
"singular": "item",
"plural": "disabled"
}
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.