-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
51 lines (44 loc) · 868 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
# A city to be used on the map
type City {
_id: Int!
lat: Float
lng: Float
todo(first: Int, after: String, last: Int, before: String): ToDoConnection
}
# Mutations for the To Do List
type Mutation {
createToDo(input: ToDoInput): ToDo
}
# An array of Cities
type Query {
cities: [City]
city(cityID: Int!): City
}
# A To Do for a city
type ToDo {
city_id: Int!
text: String
likes: Int
_id: Int!
}
# To Do Connection
type ToDoConnection {
edges: [ToDoEdge]
pageInfo: ToDoPageInfo
}
# To Do Edge
type ToDoEdge {
node: ToDo
cursor: String!
}
input ToDoInput {
city_id: Int!
text: String
}
# ToDo Page Info
type ToDoPageInfo {
hasPreviousPage(first: Int, after: String, last: Int, before: String): Boolean!
hasNextPage(first: Int, after: String, last: Int, before: String): Boolean!
startCursor: String!
endCursor: String!
}