Make Relation Fields Required #41
Comments
Very good point. This is fairly important! |
Any news on this front? |
Hi @sedubois! This feature is now in beta. Feel free to ping us in Slack to get access to this new feature. |
This is now available to everyone. Note that to-many relational fields are always required. If a node is not connected to any nodes in such a relation, it is the empty list You can set a relation to required both in the UI and the schema file. |
Thanks great news! I tried to use this, but I don't see a way to make a relation required through the UI. I also couldn't make it required through the schema, getting However, I only have three instances which all three have a proper value for this field. I think documentation would be helpful for this. @marktani any pointers? |
This looks to be an issue with migrating an existing optional relation to a required relation. Here's a bug tracker: https://github.com/graphcool/api-bugs/issues/90. You need to hover the relation field to enable the selection between required/optional: |
Thanks @marktani. I don't see this required/optional toggle, maybe related to the bug you linked? Regardless of where I hover with my mouse on this wizard, I don't see this toggle appearing. |
No, this is a separate bug - could you please create a new issue here? |
Add a toggle to make relation fields required, just like you can with scalar fields, when creating a node.
The text was updated successfully, but these errors were encountered: