-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.graphql
71 lines (58 loc) · 1.04 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
input AddItemInput {
text: String!
}
type AddItemOutput {
error: Error
item: TodoItem
}
"""Date custom scalar type"""
scalar DateTime
type DeleteIemOutput {
error: Error
itemID: ID
}
type Error {
code: String!
message: String!
}
type ItemUpdate {
item: TodoItem!
}
type Mutation {
addItem(input: AddItemInput!): AddItemOutput!
checkItem(item: ID!): UpdateItemOutput!
deleteItem(item: ID!): DeleteIemOutput!
uncheckItem(item: ID!): UpdateItemOutput!
}
type PageInfo {
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
}
type Query {
items(after: String, completed: Boolean, first: Int): TodoItemConnection!
}
type Subscription {
itemUpdate(id: ID!): ItemUpdate!
newItem: ItemUpdate!
}
type TodoItem {
completed: Boolean!
createdAt: DateTime!
id: ID!
text: String!
}
type TodoItemConnection {
edges: [TodoItemEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type TodoItemEdge {
cursor: String
node: TodoItem
}
type UpdateItemOutput {
error: Error
item: TodoItem
}