-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.gql
163 lines (143 loc) · 3.14 KB
/
schema.gql
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
type Query {
node(id: String!): Node!
clientVersion: String!
user(id: String!): User!
me: User!
socketUser(id: String!): SocketUser!
colorPalettesPublic: [ColorPalette!]!
colorPalette(id: String!): ColorPalette!
room(id: String!): Room!
roomsPublic: [Room!]!
userCanvasProfile(id: String!): UserCanvasProfile!
}
interface Node {
id: ID!
}
type User implements Node {
id: ID!
displayName: String!
profilePictureUrl: String!
roles: [DiscordRole!]!
createdColorPalettes: [ColorPalette!]!
createdRooms: [Room!]!
canvasProfile: UserCanvasProfile!
}
type DiscordRole {
id: ID!
displayName: String!
colorHex: String!
}
type ColorPalette implements Node {
id: ID!
name: String!
colors: [ColorPaletteItem!]!
isPublic: Boolean!
author: User!
}
type ColorPaletteItem {
id: String!
name: String!
r: Float!
g: Float!
b: Float!
a: Float!
hex: String!
}
type Room implements Node {
id: ID!
name: String!
isPublic: Boolean!
hasPassword: Boolean!
owner: User!
userCount: Float!
users: [SocketUser!]!
}
type SocketUser implements Node {
id: ID!
userId: String!
roomId: String!
isGuest: Boolean!
user: User
displayName: String!
profilePictureUrl: String
}
type UserCanvasProfile implements Node {
id: ID!
openColorPaletteIds: [String!]!
color1: String!
color2: String!
thickness: Float!
}
type Mutation {
userAttachEmailPassword(input: UserAttachEmailPasswordInput!): User!
colorPaletteSetIsPublic(input: ColorPaletteSetIsPublicInput!): ColorPalette!
colorPaletteSetName(input: ColorPaletteSetNameInput!): ColorPalette!
colorPaletteSetColor(input: ColorPaletteSetColorInput!): ColorPalette!
colorPaletteCreate(input: ColorPaletteCreateInput!): ColorPalette!
colorPaletteAddColor(input: ColorPaletteItemAddInput!): ColorPalette!
colorPaletteRemoveColor(input: ColorPaletteItemRemoveInput!): ColorPalette!
colorPaletteDelete(id: String!): Boolean!
roomCreate(input: RoomCreateInput!): Room!
roomDelete(input: RoomDeleteInput!): Boolean!
userCanvasProfileSet(input: UserCanvasProfileSetInput!): UserCanvasProfile!
}
input UserAttachEmailPasswordInput {
id: String!
email: String!
password: String!
}
input ColorPaletteSetIsPublicInput {
id: String!
isPublic: Boolean!
}
input ColorPaletteSetNameInput {
id: String!
name: String!
}
input ColorPaletteSetColorInput {
colorPaletteId: String!
colorId: String!
r: Float!
g: Float!
b: Float!
a: Float!
}
input ColorPaletteCreateInput {
name: String!
authorUserId: String!
colors: [ColorPaletteItemInput!]!
isPublic: Boolean!
}
input ColorPaletteItemInput {
name: String
r: Float
g: Float
b: Float
a: Float
hex: String
}
input ColorPaletteItemAddInput {
colorPaletteId: String!
colors: [ColorPaletteItemInput!]!
}
input ColorPaletteItemRemoveInput {
colorPaletteId: String!
colorId: String!
}
input RoomCreateInput {
name: String!
isPublic: Boolean!
password: String!
hasPassword: Boolean!
ownerUserId: String!
}
input RoomDeleteInput {
id: String!
}
input UserCanvasProfileSetInput {
id: String!
color1: String
color2: String
thickness: Float
openColorPaletteIds: [String!]
}