api-platform / api-platform/core

Eager loading extension doesn't allow change context dynamically

未關閉
#2,157 11 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
GraphQL
主要語言
PHP
星號
2.6k
分支
980
平均合併
2 天 5 小時
30 天內合併 PR
48

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。