Universal node (uid) in @hasInverse object in schema

I think I understand. You can extract the video on Commercial and Promotion into an interface.

interface VideoContainer {
    video: Video
}

type Commercial implements VideoContainer {
    id: ID!
    name: String!
}

type Promotion implements VideoContainer {
    id: ID!
    name: String!
}

type Video {
    id: ID!
    url: String!
    container: VideoContainer @hasInverse(field: video)
}

I don’t have expierence with DQL-Schemas if you were to use it, but I would stick to a GraphQL-Schema anyways.

1 Like