-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype Comparison.coffee
39 lines (39 loc) · 959 Bytes
/
type Comparison.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
type Comparison
@model(subscriptions: null)
@auth(
rules: [
{
allow: private
provider: iam
operations: [create, read, update, delete]
}
{
allow: groups
groups: ["SUPERADMIN"]
operations: [create, read, update, delete]
}
{
allow: owner
ownerField: "userID"
identityClaim: "sub"
operations: [read]
}
]
) {
id: ID!
gamma1ID: ID! @index(name: "byGamma1")
gamma1: Gamma @hasOne(fields: ["gamma1ID"])
gamma2ID: ID! @index(name: "byGamma2")
gamma2: Gamma @hasOne(fields: ["gamma2ID"])
objectiveID: ID! @index(name: "byObjective")
objective: Objective! @hasOne(fields: ["objectiveID"])
preference: COMPARISON_PREFERENCE
userID: ID!
@index(
name: "byUser"
sortKeyFields: ["preference"]
queryField: "comparisonsByUserID"
)
user: User! @hasOne(fields: ["userID"])
expiry: AWSTimestamp! @ttl
}