-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
62 lines (52 loc) · 921 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
57
58
59
60
61
62
input AddFriendsInput {
first: ID!
second: ID!
}
type Cat implements Pet {
id: ID!
name: String!
makeSound: String!
beLazy: String!
}
type Dog implements Pet {
id: ID!
name: String!
makeSound: String!
barkLoudly: String!
}
interface Pet {
id: ID!
name: String!
makeSound: String!
}
type Person {
id: ID!
name: String!
description: String!
dateOfBirth: Date!
friends: [Person!]!
pets: [Pet!]!
}
input PersonInput {
name: String!
}
union SearchResult = Dog | Cat | Person
input SearchInput {
queryString: String!
}
type Query {
allPeople: [Person!]!
person(id: ID!): Person!
search(input: SearchInput!): [SearchResult!]!
}
type Mutation {
addPerson(input: PersonInput!): Person!
addFriends(input: AddFriendsInput!): Boolean!
generateData: [Person!]!
wipeData: WipeDataPayload!
}
type WipeDataPayload {
success: Boolean!
}
# RFC3339: full-date
scalar Date