api-platform / api-platform/core

[GraphQL] Use same type for mutations and queries if normalization context is equal

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

描述

**Description**

[https://api-platform.com/docs/core/graphql/#different-types-when-using-different-serialization-groups](https://api-platform.com/docs/core/graphql/#different-types-when-using-different-serialization-groups)

In your documentation it states that if the normalization context is the same, then the generated type will be equal. However, looking at the TypeBuilder's code this appears to only be the case for collection_query and item_query. It would be nice if this was also the case for mutations and even custom mutations, because otherwise certain features of popular clients like Apollo don't work as expected (e.g. caching).

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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