-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.js
36 lines (31 loc) · 785 Bytes
/
schema.js
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
var { buildSchema } = require("graphql")
export const schema = buildSchema(`
type User {
id: ID!
username: String!
password: String!
level_on: Int!
}
type Coin {
x: Float!
y: Float!
bad: Boolean!
}
type Level {
id: ID!
gridSize: Int!
fuel: Float!
animationSpeed: Float!
coinCount: Int!
coins: [Coin]!
}
type Query {
getLevel(jwt: String!, level: Int!): Level!
getUser(jwt: String!): User!
}
type Mutation {
register(username: String!, password: String!): User!
login(username: String!, password: String!): String!
submitSolution(jwt: String!, level: Int!, expression: String!): Boolean!
}
`);