-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
165 lines (144 loc) · 2.54 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
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
type CardBoardTarget {
id: String
index: Int
owner: String
place: String
}
type CardCommandTarget {
from: CardBoardTarget
to: CardBoardTarget
}
type CardDuel {
config: CardDuelConfig
history: [CardDuelCommandBundle]
id: String
}
type CardDuelAttributes {
attack: Int
charge: Int
defense: Int
gameOver: Boolean
health: Int
perTurnHero: Int
perTurnTroop: Int
turn: Int
}
type CardDuelCommand {
owner: String
payload: CardDuelAttributes
target: CardCommandTarget
type: String!
}
type CardDuelCommandBundle {
commands: [CardDuelCommand]
group: String
phase: String
phaseOf: String
turn: Int
}
type CardDuelConfig {
firstMover: String!
firstPlayer: CardPlayerConfig!
secondPlayer: CardPlayerConfig!
setting: CardDuelSetting!
version: String!
}
type CardDuelHistory {
duel: CardDuel!
enemy: Profile
id: String
timestamp: String!
victory: Boolean
}
type CardDuelSetting {
groundSize: Int
handSize: Int
maxAttachment: Int
perTurnHero: Int
perTurnTroop: Int
playerHealth: Int
}
type CardPlayerConfig {
deck: [String]
id: String
}
scalar DateTime
type MatchFound {
id: String!
jwt: String!
}
input MutateProfileInput {
avatarUrl: String
name: String
}
type Mutation {
createQuestAction(questId: ID!): QuestAction
makeReferral(referralCode: String!): Boolean
updateProfile(profileInput: MutateProfileInput): Profile
}
type Profile {
address: String
avatarUrl: String
bindingId: String
discordId: String
email: String
id: String!
name: String
points: Int!
referralCode: String!
referred: ReferralHistory
telegramId: String
twitterId: String
}
type Query {
cardDuel(id: String!): CardDuel
cardDuelHistory(limit: Int): [CardDuelHistory]
cardDuelPlaying: CardDuelHistory
greeting: String
profile(address: String): Profile
quests(status: QuestStatus): [Quest]
referralHistory: [ReferralHistory]
}
type Quest {
action: QuestAction
createdAt: DateTime!
description: String!
id: ID!
points: Int!
status: QuestStatus!
title: String!
type: QuestType!
url: String!
}
type QuestAction {
claimedPoints: Int!
createdAt: DateTime!
id: ID!
questId: ID!
userId: ID!
}
enum QuestStatus {
DISABLE
INIT
LIVE
}
enum QuestType {
CHAT_DISCORD
COMMENT_X
FOLLOW_X
JOIN_DISCORD
LIKE_X
RETWEET_X
}
type ReferralHistory {
claimedPoints: Int
createdAt: DateTime
id: ID!
refereeId: String
refereeUser: Profile
referrerId: String
}
type Subscription {
counterIncreased: Int!
findMatch(userId: String!): MatchFound
}