-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
79 lines (72 loc) · 1.37 KB
/
schema.graphql
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
type ContractAdmin @entity {
id: ID!
count: BigInt!
previousAdmin: Bytes! # address
newAdmin: Bytes! # address
}
type Organisation @entity {
id: ID!
name: String
description: String
metadataURI: String
image: String
websiteURL: String
twitterId: String
discordServer: String
contactEmail: String
industry: String
events: [Event!]! @derivedFrom(field: "organisation")
}
type Skill @entity {
id: String!
name: String!
description: String
category_id: BigInt
subcategory_id: BigInt
type: String
}
# General Type
type User @entity {
id: ID!
badge: [Badge!]
}
# Badges Related
interface Badge {
id: ID!
type: BadgesType!
tokenId: BigInt!
name: String
image: String
attributes: [String!]
owner: [User!] @derivedFrom(field: "badge")
}
enum BadgesType {
EVENT
WORK
}
# Event Related
type Event @entity {
id: ID! # address
code: String
name: String
start_date: BigInt
end_date: BigInt
organisation: Organisation!
event_badges: [EventBadge!]! @derivedFrom(field: "event")
}
type EventBadge implements Badge @entity {
id: ID! # <contract_address>-<tokenId>
type: BadgesType!
tokenId: BigInt!
name: String
description: String
image: String
attributes: [String!]
start_time: BigInt
end_time: BigInt
role: String
contentURL: String
quota: BigInt
owner: [User!] @derivedFrom(field: "badge")
event: Event!
}