-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
wiki.graphql
70 lines (61 loc) · 1.02 KB
/
wiki.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
"""
A Log is a journal entry by an individual.
"""
type Log implements Linkable {
id: ID!
description: String!
project: String!
user: User!
duration: Duration
uri: URI!
sector: Sector!
started: Time!
stopped: Time!
created: Time!
modified: Time!
}
"""
Geo is a simple type for wrapping a point.
"""
type Geo {
lat: Float!
long: Float!
}
type Photo implements Linkable {
id: ID!
year: Int!
content_type: String!
created: Time!
modified: Time!
uri: URI!
}
enum Sector {
CODE
WRITING
AUDIO
RESEARCH
SOCIAL
PERSONAL
}
input NewLog {
sector: Sector!
description: String
project: String!
started: Time!
stopped: Time!
}
input InputGeo {
lat: Float!
long: Float!
}
extend type Query {
"Returns all Logs for your user."
logs(input: Limit): [Log]! @loggedIn
"Returns a log based on an ID."
log(id: ID!): Log @loggedIn
"Returns all photos for your user."
photos(input: Limit): [Photo]! @loggedIn
}
extend type Mutation {
insertLog(input: NewLog!): Log @loggedIn
}