@unique
Use the @unique directive to mark a field as unique.
Any attempt to insert a duplicate value will result in an error.
This directive exists on object level as well:
@unique
type User @upsertOn(...) {
name: String! @unique
}
In this case, the name field is marked as unique.