how to limit the amount of the alias
- 主要言語
- Go
- スター
- 10.8k
- フォーク
- 1.3k
- 平均マージ
- 2日 36分
- マージ済み PR(30日)
- 26
説明
### What happened?
I can't limit the amount of the alias. FixedComplexityLimit limits the complexity of the query.
### What did you expect?
I want to limit the amount of the alias to prevent the batching attack. Let's try to explain by giving an example.
```
query {
productsByIds(productIds: "353573855") {
active {
id
path
title
}
productsByIds2: productsByIds(productIds: "353573855") {
active {
id
path
title
}
}
```
The above query should give an error. However, the below should work. This is just an example I have more complex schemas that's why the complexity limit didn't work for me.
```
query {
productsByIds(productIds: "353573855") {
active {
id
path
title
}
products {
active {
id
path
title
}
}
}
```
### Minimal graphql.schema and models to reproduce
### versions
- `go run github.com/99designs/gqlgen version` v0.17.22
- `go version` 1.19
コントリビューションガイド
評価
この issue はまだ評価されていません。