Azure / Azure/data-api-builder

[Enhancement]: new config item to disable plural / SELECT queries against Cosmos DB (allow ReadItemAsync only)

オープン
#2,433 コメント 0 件 リアクション 0 件 担当者 1 名 @sajeetharan が担当を希望しています GitHub で見る
cosmos enhancement known-issue
主要言語
C#
スター
1.5k
フォーク
370
平均マージ
3日 22時間
マージ済み PR(30日)
9

説明

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"
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。