Skip to content

Anyof , specific required fields #3848

Discussion options

You must be logged in to vote

Yeah something like that

model Person {
   
}

model PersonWIthName {
  name: string;
  address?: string;
}

model PersonWithAddress {
  name?: string;
  address: string;
}

union Person {
  PersonWIthName, PersonWithAddress
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@timotheeguerin
Comment options

Answer selected by Meriyemelhajoui
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants