I want to create two type User
and Cluster
. I’m writing it in this way:
name: string @index(exact) .
username: string @index(exact) .
bio: string .
age: int .
location: geo .
dob: datetime .
tags: [string] .
connections: [uid] @reverse .
cluster: uid .
radius: int .
participants: int .
maxParticipants: int .
softConnectRadius: int .
connectRadius: int .
premium: bool .
entryCost: int .
type User {
name: string
username: string
bio: string
age: int
location: geo
dob: datetime
tags: [string]
connections: [User]
cluster: Cluster
}
type Cluster {
name: string
bio: string
location: geo
radius: int
participants: int
maxParticipants: int
softConnectRadius: int
connectRadius: int
premium: bool
entryCost: int
}
I’m wondering if in case I want to add more types, then this will create confusion for fields. Is there any other way to write schemas? I tried other methods but they failed to load in dgraph.