Solved

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

  • 22 March 2023
  • 4 replies
  • 82 views

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.

icon

Best answer by Dilini Fernando 19 April 2023, 09:41

View original

4 replies

Userlevel 3

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. 

Userlevel 3

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.

Userlevel 4
Badge +2

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

Reply