-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
75 lines (57 loc) · 956 Bytes
/
schema.gql
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
type File {
id: Int!
name: String!
isPublic: Boolean!
createdAt: NaiveDateTime!
downloadUrl: String!
user: User!
fileShares: [FileShare!]!
}
scalar FileId
input FileInput {
name: String!
isPublic: Boolean!
uuid: String!
}
type FileShare {
id: Int!
createdAt: NaiveDateTime!
file: File!
user: User!
}
input FileShareInput {
fileId: FileId!
userId: UserId!
}
type Mutation {
uploadTarget: UploadTarget!
createFile(input: FileInput!): File!
createFileShare(input: FileShareInput!): FileShare!
}
"""
ISO 8601 combined date and time without timezone.
# Examples
* `2015-07-01T08:59:60.123`,
"""
scalar NaiveDateTime
type Query {
users: [User!]!
file(id: FileId!): File!
myFiles: [File!]!
fileSharesWithMe: [FileShare!]!
}
type UploadTarget {
uuid: String!
url: String!
}
type User {
id: Int!
username: String!
displayName: String!
publicFiles: [File!]!
}
scalar UserId
schema {
query: Query
mutation: Mutation
}