Hi all
I am trying to design my own project and was curious about something once I finished design. So initially My system had the follwoing two relationships going on
(User) -[LIVES_AT]->(Address)-[HASZIP]->Zipcode
(Clubs) -[LOCATED_AT]->(Address)-[HASZIP]->Zipcode
After the first iteration I figured I should remove the address node entirely(it had no properties in it that I really wanted to keep). So now I want it something like
(User) -[HASZIP]->Zipcode
(Clubs) -[HASZIP]->Zipcode
So here is the question part. When writing a typedef for this realtionship, I want the api to allow user to be null or club to be null but not both. Is there a way to achieve this?
type HAS_ZIP @relation(name: "HAS_ZIP"){
id:ID!
user: User(not sure?)
club: Club(not sure?)
zipcode : ZIPCode!
}