Here is a simplified snippet out of a GraphQL Schema I work with. There are - an enum, type Contributor and type Review.
enum CONTRIBUTOR_TYPE {
AUTHOR
EDITOR
}
type Contributor {
name: String
role: CONTRIBUTOR_TYPE
}
type Article {
text: String
authors: [Contributor]
}
What I want to describe, is that the "authors" field is not just array of type Contributor, but Contributor with specific job role. In pseudocode it would look like
authors: [Contributor{type: CONTRIBUTOR_TYPE.AUTHOR}]!
Is there a way to describe this constraint in GraphQL Schema?