This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema-public.graphql
236 lines (226 loc) · 5.91 KB
/
schema-public.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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
"""
A user-created list of Pocket saves that can be shared publicly.
"""
type ShareableList {
"""
A unique string identifier in UUID format.
"""
externalId: ID!
"""
The user who created this shareable list.
"""
user: User!
"""
A URL-ready identifier of the list. Generated from the title
of the list when it's first made public. Unique per user.
"""
slug: String
"""
The title of the list. Provided by the Pocket user.
"""
title: String!
"""
Optional text description of a Shareable List. Provided by the Pocket user.
"""
description: String
"""
The status of the list. Defaults to PRIVATE.
"""
status: ShareableListVisibility!
"""
The moderation status of the list. Defaults to VISIBLE.
"""
moderationStatus: ShareableListModerationStatus!
"""
The timestamp of when the list was created by its owner.
"""
createdAt: ISOString!
"""
The timestamp of when the list was last updated by its owner
or a member of the moderation team.
"""
updatedAt: ISOString!
"""
Pocket Saves that have been added to this list by the Pocket user.
"""
listItems: [ShareableListItem!]!
"""
The visibility of notes added to list items for this list.
"""
listItemNoteVisibility: ShareableListVisibility!
}
"""
A list that has been already shared publicly.
This type is needed as it needs to be cached.
"""
type ShareableListPublic @cacheControl(maxAge: 60, scope: PUBLIC) {
"""
A unique string identifier in UUID format.
"""
externalId: ID!
"""
The user who created this shareable list.
"""
user: User! @cacheControl(maxAge: 60, scope: PUBLIC)
"""
A URL-ready identifier of the list. Generated from the title
of the list when it's first made public. Unique per user.
"""
slug: String
"""
The title of the list. Provided by the Pocket user.
"""
title: String!
"""
Optional text description of a Shareable List. Provided by the Pocket user.
"""
description: String
"""
The status of the list. Defaults to PRIVATE.
"""
status: ShareableListVisibility!
"""
The moderation status of the list. Defaults to VISIBLE.
"""
moderationStatus: ShareableListModerationStatus!
"""
The timestamp of when the list was created by its owner.
"""
createdAt: ISOString!
"""
The timestamp of when the list was last updated by its owner
or a member of the moderation team.
"""
updatedAt: ISOString!
"""
Pocket Saves that have been added to this list by the Pocket user.
"""
listItems: [ShareableListItem!]! @cacheControl(maxAge: 60, scope: PUBLIC)
"""
The visibility of notes added to list items for this list.
"""
listItemNoteVisibility: ShareableListVisibility!
}
"""
Input data for creating a Shareable List.
"""
input CreateShareableListInput {
title: String! @constraint(maxLength: 100)
description: String @constraint(maxLength: 200)
listItemNoteVisibility: ShareableListVisibility
}
"""
Input data for updating a Shareable List.
"""
input UpdateShareableListInput {
externalId: ID!
title: String @constraint(maxLength: 100)
description: String @constraint(maxLength: 200)
status: ShareableListVisibility
listItemNoteVisibility: ShareableListVisibility
}
"""
Input data for creating a Shareable List Item.
"""
input CreateShareableListItemInput {
listExternalId: ID!
itemId: ID!
url: Url!
title: String
excerpt: String
note: String @constraint(maxLength: 300)
imageUrl: Url
publisher: String
authors: String
sortOrder: Int!
}
"""
Input data for creating a Shareable List Item during Shareable List creation.
"""
input CreateShareableListItemWithList {
itemId: ID!
url: Url!
title: String
excerpt: String
note: String @constraint(maxLength: 300)
imageUrl: Url
publisher: String
authors: String
sortOrder: Int!
}
"""
Input data for updating a single Shareable List Item.
"""
input UpdateShareableListItemInput {
externalId: ID!
note: String @constraint(maxLength: 300)
sortOrder: Int
}
"""
Input data for updating an array of Shareable List Items, targeting sortOrder.
"""
input UpdateShareableListItemsInput {
externalId: ID!
sortOrder: Int!
}
type Query {
"""
Looks up and returns a Shareable List with a given external ID for a given user.
(the user ID will be coming through with the headers)
"""
shareableList(externalId: ID!): ShareableList
"""
Returns a publicly-shared Shareable List. Note: this query does not require user authentication.
"""
shareableListPublic(externalId: ID!, slug: String!): ShareableListPublic
"""
Looks up and returns an array of Shareable Lists for a given user ID for a given user.
(the user ID will be coming through with the headers)
"""
shareableLists: [ShareableList!]!
"""
Determines if the userid passed in the headers has access to the pilot program.
"""
shareableListsPilotUser: Boolean!
}
type Mutation {
"""
Creates a Shareable List. Takes in an optional listItemData parameter to create a ShareableListItem
along with a ShareableList.
"""
createShareableList(
listData: CreateShareableListInput!
listItemData: CreateShareableListItemWithList
): ShareableList
"""
Deletes a Shareable List.
"""
deleteShareableList(externalId: ID!): ShareableList!
"""
Updates a Shareable List. Cannot make a list public.
"""
updateShareableList(data: UpdateShareableListInput!): ShareableList!
"""
Creates a Shareable List Item.
"""
createShareableListItem(
data: CreateShareableListItemInput!
): ShareableListItem
"""
Updates a single Shareable List Item.
"""
updateShareableListItem(
data: UpdateShareableListItemInput!
): ShareableListItem!
"""
Updates an array of Shareable List Items (sortOrder).
"""
updateShareableListItems(
data: [UpdateShareableListItemsInput!]!
@constraint(minItems: 1, maxItems: 30)
): [ShareableListItem!]!
"""
Deletes a Shareable List Item. HIDDEN Lists cannot have their items deleted.
"""
deleteShareableListItem(externalId: ID!): ShareableListItem!
}