-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathschema.graphql
More file actions
677 lines (607 loc) · 13 KB
/
schema.graphql
File metadata and controls
677 lines (607 loc) · 13 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
### This file was generated by Nexus Schema
### Do not make changes to this file directly
input AddProjectToTournamentInput {
project_id: Int!
tournament_id: Int!
track_id: Int!
}
type Author {
avatar: String!
id: Int!
join_date: Date!
lightning_address: String
name: String!
}
type Award {
id: Int!
image: String!
project: Project!
title: String!
url: String!
}
interface BaseUser {
avatar: String!
bio: String
discord: String
github: String
id: Int!
in_tournament(id: Int!): Boolean!
is_in_founders_club: Boolean!
jobTitle: String
join_date: Date!
lightning_address: String
linkedin: String
location: String
name: String!
nostr_keys: [NostrKey!]!
projects: [Project!]!
role: String
roles: [MakerRole!]!
similar_makers: [User!]!
skills: [MakerSkill!]!
stories: [Story!]!
tournaments: [Tournament!]!
twitter: String
website: String
}
type Bounty implements PostBase {
applicants_count: Int!
applications: [BountyApplication!]!
author: Author!
body: String!
cover_image: String
createdAt: Date!
deadline: String!
excerpt: String!
id: Int!
is_published: Boolean
reward_amount: Int!
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
type BountyApplication {
author: Author!
date: String!
id: Int!
workplan: String!
}
enum CLUB_INVITATION_STATUS {
ACCEPTED
DECLINED
INVALID
UNUSED
}
type Capability {
icon: String!
id: Int!
title: String!
}
type Category {
apps_count: Int!
cover_image: String
icon: String
id: Int!
project: [Project!]!
title: String!
votes_sum: Int!
}
input CreateProjectInput {
capabilities: [Int!]!
category_id: Int!
cover_image: ImageInput!
description: String!
discord: String
figma: String
github: String
hashtag: String!
id: Int
launch_status: ProjectLaunchStatusEnum!
lightning_address: String
members: [TeamMemberInput!]!
npub: String
recruit_roles: [Int!]!
screenshots: [ImageInput!]!
slack: String
tagline: String!
telegram: String
thumbnail_image: ImageInput!
title: String!
tournaments: [Int!]!
twitter: String
website: String!
}
type CreateProjectResponse {
project: Project!
}
"""Date custom scalar type"""
scalar Date
type Donation {
amount: Int!
by: User
createdAt: Date!
id: Int!
paid: Boolean!
payment_hash: String!
payment_request: String!
}
type DonationsStats {
applications: String!
donations: String!
prizes: String!
touranments: String!
}
type GenericMakerRole {
icon: String!
id: Int!
title: String!
}
type Hackathon {
cover_image: String!
description: String!
end_date: Date!
id: Int!
location: String!
start_date: Date!
tags: [Tag!]!
title: String!
website: String!
}
input ImageInput {
id: String
name: String
url: String!
}
type LnurlDetails {
commentAllowed: Int
maxSendable: Int
metadata: String
minSendable: Int
}
type MakerRole {
icon: String!
id: Int!
level: RoleLevelEnum!
title: String!
}
input MakerRoleInput {
id: Int!
level: RoleLevelEnum!
}
type MakerSkill {
id: Int!
title: String!
}
input MakerSkillInput {
id: Int!
}
type Mutation {
acceptOrRejectClubInvitation(data: acceptOrRejectClubInvitationInput): User!
addProjectToTournament(input: AddProjectToTournamentInput): ParticipationInfo
applyToFoundersClub(data: applyToFoundersClubInput): String!
confirmDonation(payment_request: String!, preimage: String!): Donation!
confirmVote(payment_request: String!, preimage: String!): Vote!
createProject(input: CreateProjectInput): CreateProjectResponse
createStory(data: StoryInputType): Story
deleteProject(id: Int!): Project
deleteStory(id: Int!): Story
donate(amount_in_sat: Int!): Donation!
linkNostrKey(event: NostrEventInput): User
registerInTournament(data: RegisterInTournamentInput, tournament_id: Int!): User
unlinkNostrKey(key: String!): User
updateProfileDetails(data: ProfileDetailsInput): User
updateProfileRoles(data: ProfileRolesInput): User
updateProject(input: UpdateProjectInput): CreateProjectResponse
updateTournamentRegistration(data: UpdateTournamentRegistrationInput, tournament_id: Int!): ParticipationInfo
updateUserPreferences(userKeys: [UserKeyInputType!]): User!
vote(amount_in_sat: Int!, item_id: Int!, item_type: VOTE_ITEM_TYPE!): Vote!
}
input NostrEventInput {
content: String!
created_at: Int!
id: String!
kind: Int!
pubkey: String!
sig: String!
tags: [[String!]!]!
}
type NostrKey {
createdAt: Date!
key: String!
label: String!
}
type NostrKeyWithUser {
key: String!
user: User!
}
enum POST_TYPE {
Bounty
Question
Story
}
type ParticipationInfo {
createdAt: Date!
email: String!
hacking_status: TournamentMakerHackingStatusEnum!
projects: [ProjectInTournament!]!
}
union Post = Bounty | Question | Story
interface PostBase {
body: String!
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
title: String!
updatedAt: Date!
votes_count: Int!
}
type PostComment {
author: Author!
body: String!
created_at: Date!
id: Int!
parentId: Int
votes_count: Int!
}
input ProfileDetailsInput {
avatar: ImageInput
bio: String
discord: String
email: String
github: String
jobTitle: String
lightning_address: String
linkedin: String
location: String
name: String
twitter: String
website: String
}
input ProfileRolesInput {
roles: [MakerRoleInput!]!
skills: [MakerSkillInput!]!
}
type Project {
awards: [Award!]!
capabilities: [Capability!]!
category: Category!
cover_image: String
description: String!
discord: String
figma: String
github: String
hashtag: String!
id: Int!
launch_status: ProjectLaunchStatusEnum!
lightning_address: String
lnurl_callback_url: String
members(take: Int): [ProjectMember!]!
members_count: Int!
npub: String
permissions: [ProjectPermissionEnum!]!
recruit_roles: [MakerRole!]!
screenshots: [String!]!
slack: String
stories: [Story!]!
tagline: String!
tags: [Tag!]!
telegram: String
thumbnail_image: String
title: String!
tournaments: [Tournament!]!
twitter: String
votes_count: Int!
website: String!
}
type ProjectInTournament {
project: Project!
track: TournamentTrack
}
enum ProjectLaunchStatusEnum {
Launched
WIP
}
type ProjectMember {
role: TEAM_MEMBER_ROLE!
user: User!
}
enum ProjectPermissionEnum {
DeleteProject
UpdateAdmins
UpdateInfo
UpdateMembers
}
type Query {
activeUsers(lastDays: Int = 30, tagId: Int, take: Int = 3): [User!]!
allCategories: [Category!]!
allProjects(skip: Int = 0, take: Int = 50): [Project!]!
checkValidProjectHashtag(hashtag: String!, projectId: Int): Boolean!
getAllCapabilities: [Capability!]!
getAllHackathons(sortBy: String, tag: Int): [Hackathon!]!
getAllMakersRoles: [GenericMakerRole!]!
getAllMakersSkills: [MakerSkill!]!
getCategory(id: Int!): Category!
getDonationsStats: DonationsStats!
getFeed(skip: Int = 0, sortBy: String, tag: Int = 0, take: Int = 10): [Post!]!
getLnurlDetailsForProject(project_id: Int!): LnurlDetails!
getMakersInTournament(openToConnect: Boolean, roleId: Int, search: String, skip: Int = 0, take: Int = 10, tournamentId: Int!): TournamentMakersResponse!
getMyDrafts(type: POST_TYPE!): [Post!]!
getPostById(id: Int!, type: POST_TYPE!): Post!
getProject(id: Int, tag: String): Project!
getProjectsById(ids: [String!]!): [Project!]!
getProjectsInTournament(lookingForMakers: Boolean, roleId: Int, search: String, skip: Int = 0, take: Int = 10, tournamentId: Int!, trackId: Int): TournamentProjectsResponse!
getTagInfo(tag: String): Tag!
getTournamentById(id: Int!): Tournament!
getTournamentToRegister: [Tournament!]!
getTrendingPosts: [Post!]!
hottestProjects(skip: Int = 0, take: Int = 50): [Project!]!
isClubInvitationValid(invitationCode: String): CLUB_INVITATION_STATUS
me: User
newProjects(skip: Int = 0, take: Int = 20): [Project!]!
officialTags: [Tag!]!
popularTags: [Tag!]!
profile(id: Int!): User
projectsByCategory(category_id: Int!, skip: Int = 0, take: Int = 60): [Project!]!
pubkeysOfMakersInTournament(tournamentId: Int!): [String!]!
pubkeysOfProjectsInTournament(tournamentId: Int!): [String!]!
recentProjectsInTag(tagId: Int!, take: Int = 3): [Project!]!
searchProjects(search: String!, skip: Int = 0, take: Int = 50): [Project!]!
searchUsers(value: String!): [User!]!
similarMakers(id: Int!): [User!]!
similarProjects(id: Int!): [Project!]!
tournamentParticipationInfo(tournamentId: Int!): ParticipationInfo
usersByNostrKeys(keys: [String!]!): [NostrKeyWithUser!]!
}
type Question implements PostBase {
author: Author!
body: String!
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
input RegisterInTournamentInput {
email: String!
hacking_status: TournamentMakerHackingStatusEnum!
}
enum RoleLevelEnum {
Advanced
Beginner
Hobbyist
Intermediate
Pro
}
type Story implements PostBase {
author: Author!
body: String!
comments: [PostComment!]!
comments_count: Int!
cover_image: String
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
nostr_event_id: String
project: Project
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
input StoryInputType {
body: String!
cover_image: ImageInput
id: Int
is_published: Boolean
project_id: Int
tags: [String!]!
title: String!
}
enum TEAM_MEMBER_ROLE {
Admin
Maker
Owner
}
type Tag {
description: String
github: String
icon: String
id: Int!
isOfficial: Boolean
links: [TagLink!]!
long_description: String
moderators: [User!]!
posts_count: Int!
title: String!
}
type TagLink {
name: String!
url: String!
}
input TeamMemberInput {
id: Int!
role: TEAM_MEMBER_ROLE!
}
type Tournament {
cover_image: String!
description: String!
end_date: Date!
events: [TournamentEvent!]!
events_count: Int!
faqs: [TournamentFAQ!]!
id: Int!
judges: [TournamentJudge!]!
location: String!
makers_count: Int!
prizes: [TournamentPrize!]!
projects_count: Int!
start_date: Date!
thumbnail_image: String!
title: String!
tracks: [TournamentTrack!]!
website: String!
}
type TournamentEvent {
description: String!
ends_at: Date!
id: Int!
image: String!
links: [String!]!
location: String!
starts_at: Date!
title: String!
type: TournamentEventTypeEnum!
website: String!
}
enum TournamentEventTypeEnum {
IRLMeetup
OnlineMeetup
TwitterSpace
Workshop
}
type TournamentFAQ {
answer: String!
question: String!
}
type TournamentJudge {
avatar: String!
company: String!
name: String!
}
enum TournamentMakerHackingStatusEnum {
OpenToConnect
Solo
}
type TournamentMakersResponse {
hasNext: Boolean
hasPrev: Boolean
makers: [TournamentParticipant!]!
}
type TournamentParticipant {
hacking_status: TournamentMakerHackingStatusEnum!
is_registered: Boolean
user: User!
}
type TournamentPrize {
amount: String!
image: String!
title: String!
}
type TournamentProjectsResponse {
allItemsCount: Int
hasNext: Boolean
hasPrev: Boolean
projects: [Project!]!
}
type TournamentTrack {
icon: String!
id: Int!
title: String!
}
input UpdateProjectInput {
capabilities: [Int!]!
category_id: Int!
cover_image: ImageInput!
description: String!
discord: String
figma: String
github: String
hashtag: String!
id: Int
launch_status: ProjectLaunchStatusEnum!
lightning_address: String
members: [TeamMemberInput!]!
npub: String
recruit_roles: [Int!]!
screenshots: [ImageInput!]!
slack: String
tagline: String!
telegram: String
thumbnail_image: ImageInput!
title: String!
tournaments: [Int!]!
twitter: String
website: String!
}
input UpdateTournamentRegistrationInput {
email: String
hacking_status: TournamentMakerHackingStatusEnum
}
type User implements BaseUser {
avatar: String!
bio: String
discord: String
github: String
id: Int!
in_tournament(id: Int!): Boolean!
is_in_founders_club: Boolean!
jobTitle: String
join_date: Date!
lightning_address: String
linkedin: String
location: String
name: String!
nostr_keys: [NostrKey!]!
private_data: UserPrivateData!
projects: [Project!]!
role: String
roles: [MakerRole!]!
similar_makers: [User!]!
skills: [MakerSkill!]!
stories: [Story!]!
tournaments: [Tournament!]!
twitter: String
website: String
}
input UserKeyInputType {
key: String!
name: String!
}
type UserPrivateData {
email: String
id: Int!
nostr_prv_key: String
nostr_pub_key: String
walletsKeys: [WalletKey!]!
}
enum VOTE_ITEM_TYPE {
Bounty
PostComment
Project
Question
Story
User
}
type Vote {
amount_in_sat: Int!
id: Int!
item_id: Int!
item_type: VOTE_ITEM_TYPE!
paid: Boolean!
payment_hash: String!
payment_request: String!
}
type WalletKey {
createdAt: Date!
is_current: Boolean!
key: String!
name: String!
}
input acceptOrRejectClubInvitationInput {
code: String!
email: String
isAccepted: Boolean!
}
input applyToFoundersClubInput {
project_id: Int!
reason: String!
}