-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphqls
60 lines (51 loc) · 1.02 KB
/
schema.graphqls
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
directive @goModel(model: String, models: [String!]) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
type AuthPayload {
refreshToken: String!
token: String!
user: User!
}
type User {
createdGames: [Game!]!
email: String!
id: Int!
name: String!
}
type Game {
createdBy: User
id: Int!
participants: [User]!
time: String!
title: String!
}
input SignupInput {
email: String!
name: String!
password: String!
}
input LoginInput {
email: String!
password: String!
}
input GameInput {
title: String!
time: String!
}
enum RSVPStatus @goModel(model: "ledape.com/gameon/ent/gameparticipant.RsvpStatus") {
YES
NO
MAYBE
}
input GameResponseInput {
rsvp: RSVPStatus!
gameId: Int!
}
type Query {
upcomingGames: [Game!]!
}
type Mutation {
login(loginInput: LoginInput): AuthPayload!
signup(signupInput: SignupInput): AuthPayload!
refreshToken(token: String!): AuthPayload!
createGame(gameInput: GameInput): Game!
respondToGameInvite(gameResponseInput: GameResponseInput): Game!
}