Hi @amaster507
Based on our previous discussion, I have updated the schema:
var Schema = `
type Tag {
organizationId: string
parentId: Tenant
key: string
value: string
resourceIds: [Resource]
}
type Resource {
name: string
parentId: Tenant
type: string
tagIds: [Tag]
owner: User
creator: User
}
type User {
name: string
parentId: Tenant
}
# establish a hierarchical relationship
type Tenant {
name: string
}
name: string @index(hash) .
key: string @index(term) .
value: string .
resourceIds: [uid] @count @reverse .
owner: uid @reverse .
creator: uid @reverse .
tagIds: [uid] @count @reverse .
organizationId: string @index(hash) .
parentId: uid .
type: string @index(term) .
`
What do you think about this schema? Do you have any suggestions on how I can optimize this further?