api-platform / api-platform/core
Entity inheritance to GraphQL interface
- 主要語言
- PHP
- 星號
- 2.6k
- 分支
- 980
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 49
描述
I like the approach of GraphQLite: if Cat and Dog both inherit from some Animal class (stored in the database using either single table inheritance or class table inheritance), then the GraphQL schema generated will have an AnimalInterface which is then implemented by Cat and Dog. This allows one to perform queries like:
```
animals {
id
... on Cat {
someCatSpecificField
}
... on Dog {
someDogSpecificField
}
}
```
to fetch all Animals along with their implementation-specific fields. Unless I'm missing something, this is not possible with API Platform? My application makes use of inheritance a lot so annoyingly it's pretty much just this issue that is ruling out API Platform.
貢獻指南
評估
這個 Issue 還沒有評估資料。