Skip to main content
Solved

Unable to model a direct relationship as required field in a view using UI


type Employee {

name: String!

department: Department!

}

type Department {

name: String!

}

I can't model a use case where an employee must belong to a department.

Best answer by Dilini Fernando

Hi @Shreyas Mehta,

I hope Anders’s reply was helpful. I’m closing this topic now, please feel free to create a new post if you have any questions.  

Br,
Dilini

View original
Did this topic help you find an answer to your question?

4 replies

Anders Hafreager
Practitioner

Correct. As of today, we don’t support required relation fields like that.


@Anders Hafreager - Is there a work around for this? If not, do you plan to fix this by GA?

Being able to ensure that an employee will always belong to a department is a very common use case in data modeling. 


Anders Hafreager
Practitioner

There is no workaround. The reason is the following:

If node X is in space A with a reference to node Y in space B.

If I delete my node Y, but don’t have access to delete your node X, what should happen? 

 

I definitely see the use case, but we will not have a solution for this on the short term.


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 671 replies
  • Answer
  • April 19, 2023

Hi @Shreyas Mehta,

I hope Anders’s reply was helpful. I’m closing this topic now, please feel free to create a new post if you have any questions.  

Br,
Dilini


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings