api-platform / api-platform/core

Eager loading extension doesn't allow change context dynamically

Đang mở
#2,157 11 bình luận 0 reaction 0 người được giao Xem trên GitHub
GraphQL
Ngôn ngữ chính
PHP
Star
2.6k
Fork
980
Merge trung bình
2 ngày 5 giờ
Pull request đã merge (30 ngày)
48

Mô tả

In my graphql-based application I would like to change normalization context dynamically while `EagerLoadingExtension` builds query. E.g. i want to have different `Groups` for different queries (I can distinguish between them by request names).

As I see, you deliberately skip the place where I could connect my `ContextBuilder` and change the context (I already have `Groups` and `Attributes` in my entity):
https://github.com/api-platform/core/blob/797cea682956871c0a848275bbaeabf1339ad615/src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php#L105-L108

Why is this done? Or did I choose the wrong way to solve my problem?

Thanks.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.