-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
80 lines (67 loc) · 1.3 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
type Author {
id: ID!
name: String!
books: [Book!]!
}
type Book implements Borrowable {
id: ID!
title: String!
author: Author!
genre: Genre
}
input BookFilterInput {
author: StringQueryOperatorInput
title: StringQueryOperatorInput
}
interface Borrowable {
id: ID!
title: String!
}
input CreateAuthorInput {
name: String!
}
input CreateBookInput {
author: ID!
title: String!
}
type Mutation {
authorCreate(input: CreateAuthorInput!): Author!
bookCreate(input: CreateBookInput!): Book!
}
type Query {
book(id: ID!): Book!
books(filter: BookFilterInput!): [Book!]!
borrowable(id: ID!): Borrowable!
shelf(id: ID!): Shelf
shelves: [Shelf!]!
videoGame(id: ID!): VideoGame!
videoGames(filter: VideoGameFilterInput!): [VideoGame!]!
}
type Shelf {
id: ID!
floor: Int!
items: [Borrowable!]!
}
input StringQueryOperatorInput {
eq: String
ne: String
in: [String]
nin: [String]
regex: String
glob: String
}
type VideoGame implements Borrowable {
id: ID!
title: String!
publisher: String!
}
input VideoGameFilterInput {
publisher: StringQueryOperatorInput
title: StringQueryOperatorInput
}
enum Genre {
CRIME
FANTASY
THRILLER
}
directive @export(exportName: String!) on FIELD