-
Notifications
You must be signed in to change notification settings - Fork 322
@EntityMapping should support object types that implement multiple interfaces #1414
Copy link
Copy link
Closed
Description
For example, I have an interface Asset, that has multiple implementations, but also a few interfaces extending it with different properties, ex:
interface Asset @key(fields: "maximoUid") {
interface UsesInBoardAsset implements Asset @key(fields: "maximoUid") {
type Breaker implements Asset & UsesInBoardAsset
@key(fields: "maximoUid") {
I have implemented an entity resolver:
@EntityMapping(value = "Asset")
fun assetEntities(
@Argument(name = "maximoUid") maximoUids: List<String>,
env: DataFetchingEnvironment,
) = env.loadAssetsByMaximoUids(maximoUids)
Which works correctly for concrete type Breaker, but is not registered for interface UsesInBoardAsset.
Whatsmore, if I manually implement mapping for those interfaces, I get
Caused by: java.lang.IllegalStateException: Object type 'Breaker' implements two EntityMapping interfaces: 'UsesInBoardAsset' and 'Asset'.
Releated to:
#1356
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement