Pass authentication through root resolver instead of middleware?
Đang mở
enhancement
- 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 there,
Is is possible to pass authentication via `&graph.Resolver{}` instead of through context? Having Auth in middleware/context tightly couples it to the implementation (and requires all tests, etc to be blessed with the right context) As well, it would be nice to be able to use the graphql error presenter for eveything including auth, instead of bailing out early in middleware
To do this, I think I need to generate the schema per request, but I'm not sure of the performance penalty here
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.