-
Notifications
You must be signed in to change notification settings - Fork 26k
/
schema.gql
196 lines (170 loc) · 3.17 KB
/
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# DO NOT MODIFY THIS FILE. This file is automatically generated by Tina
"""
References another document, used as a foreign key
"""
scalar Reference
"""
"""
scalar JSON
type SystemInfo {
filename: String!
basename: String!
breadcrumbs(excludeExtension: Boolean): [String!]!
path: String!
relativePath: String!
extension: String!
template: String!
collection: Collection!
}
type PageInfo {
hasPreviousPage: Boolean!
hasNextPage: Boolean!
startCursor: String!
endCursor: String!
}
"""
"""
interface Node {
id: ID!
}
"""
"""
interface Document {
sys: SystemInfo
id: ID!
form: JSON!
values: JSON!
}
"""
A relay-compliant pagination connection
"""
interface Connection {
totalCount: Float!
}
type Query {
getCollection(collection: String): Collection!
getCollections: [Collection!]!
node(id: String): Node!
getDocument(collection: String, relativePath: String): DocumentNode!
getDocumentList(
before: String
after: String
first: Float
last: Float
): DocumentConnection!
getDocumentFields: JSON!
getPostsDocument(relativePath: String): PostsDocument!
getPostsList(
before: String
after: String
first: Float
last: Float
): PostsConnection!
}
type DocumentConnectionEdges {
cursor: String
node: DocumentNode
}
type DocumentConnection implements Connection {
pageInfo: PageInfo
totalCount: Float!
edges: [DocumentConnectionEdges]
}
type Collection {
name: String!
slug: String!
label: String
path: String!
format: String
matches: String
templates: [JSON]
fields: [JSON]
documents(
before: String
after: String
first: Float
last: Float
): DocumentConnection!
}
union DocumentNode = PostsDocument
type PostsAuthor {
name: String
picture: String
}
type PostsOgImage {
url: String
}
type Posts {
title: String
excerpt: String
coverImage: String
date: String
author: PostsAuthor
ogImage: PostsOgImage
body: String
}
type PostsDocument implements Node & Document {
id: ID!
sys: SystemInfo!
data: Posts!
form: JSON!
values: JSON!
dataJSON: JSON!
}
type PostsConnectionEdges {
cursor: String
node: PostsDocument
}
type PostsConnection implements Connection {
pageInfo: PageInfo
totalCount: Float!
edges: [PostsConnectionEdges]
}
type Mutation {
addPendingDocument(
collection: String!
relativePath: String!
template: String
): DocumentNode!
updateDocument(
collection: String
relativePath: String!
params: DocumentMutation!
): DocumentNode!
createDocument(
collection: String
relativePath: String!
params: DocumentMutation!
): DocumentNode!
updatePostsDocument(
relativePath: String!
params: PostsMutation!
): PostsDocument!
createPostsDocument(
relativePath: String!
params: PostsMutation!
): PostsDocument!
}
input DocumentMutation {
posts: PostsMutation
}
input PostsAuthorMutation {
name: String
picture: String
}
input PostsOgImageMutation {
url: String
}
input PostsMutation {
title: String
excerpt: String
coverImage: String
date: String
author: PostsAuthorMutation
ogImage: PostsOgImageMutation
body: String
}
schema {
query: Query
mutation: Mutation
}