Allow checking if Response Context exists
- 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ả
### What happened?
The `panic` approach to treat cases when a Gqlgen related context is missing can cause unexpected issues when you have some helper func depending on one of the contexts to do something.
i.e. in our case, we have some helper functions that use the `AddError` and `GetErrors` but have no way to check if `HasResponseContext` similar to how we check if `HasOperationContext` based on the current API.
### What did you expect?
Have a function `HasResponseContext` to be able to check if it exists and prevent `panic` if it does not in code using gqlgen funcs that require the Response Context to exist.
### Minimal graphql.schema and models to reproduce
N/A
### versions
- the main branch still does not have a way to check if `Response Context` exists.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.