-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
kind/featureSomething completely new we should consider.Something completely new we should consider.
Milestone
Description
As posted on the community forum:
It would be useful to be able to assign a uid to a predicate directly without adding it to a Posting List. For example, I might have a predicate teacher, where it is only ever possible to have one teacher at a time.
At the moment I would have to do the following to update the predicate, which means 2 round trips and is unnecessarily verbose.
mutation {
delete {
<0x4> teacher * .
}
}
mutation {
set {
<0x4> teacher <0x9> .
}
}
Ideally, you would want to be able to specify in the schema that that predicate only accepts a single uid.
mutation {
schema {
teacher: uid @unary
}
}
It would also have the added benefit of being able to return an object instead of an array when the unary predicate is being queried, as it would know there could only ever be one node/object.
liqweed, phifty, farscape2012, marwan-at-work, cyphercider and 2 more
Metadata
Metadata
Assignees
Labels
kind/featureSomething completely new we should consider.Something completely new we should consider.