ComplexityLimit increments one point for Scalars as well
- Ngôn ngữ chính
- Go
- Star
- 10.8k
- Fork
- 1.3k
- Merge trung bình
- 2 ngày 36 phút
- Pull request đã merge (30 ngày)
- 26
Mô tả
Hi,
Thank you for this amazing library, and all the hard work put into making this. It definitely makes my day-to-day life easier
### What happened?
- I used extenstion.FixedLimitComplexity(5)
### What did you expect?
- I expected the following behavior
```
query {
shop { # Object - 1 point
id # ID - 0 points
name # String - 0 points
timezoneOffsetMinutes # Int - 0 points
customerAccounts # Enum - 0 points
}
}
```
https://shopify.engineering/rate-limiting-graphql-apis-calculating-query-complexity
However, I noticed that the complexity is incremented by 1 even for scalar types. [This](https://github.com/99designs/gqlgen/blob/master/complexity/complexity.go#L45) is the line that is responsible for it.
If this is not the expected behavior, I'm happy to make the change to fix the issue. Please let me know.
Thanks
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.