-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
56 lines (47 loc) · 845 Bytes
/
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
schema {
query: Query
mutation: Mutation
}
type Person {
name: String!
height: String!
mass: String!
gender: String!
homeworld: String!
}
type User {
name: String!
password: String!
}
type Token {
name: String!
token: String!
}
type PersonResult {
success: Boolean!
errors: [String]
person: Person
}
type UserResult {
success: Boolean!
errors: [String]
user: User
}
type UserToken {
success: Boolean!
errors: [String]
token: Token
}
type People {
success: Boolean!
errors: [String]
persons: [Person]
}
type Query {
persons(page: String) : People!
person(personName: String!): PersonResult!
}
type Mutation {
createUser(name: String!, password: String!): UserResult!
loginUser(username: String!, password: String!): UserToken!
}