@financial-times/cp-content-pipeline-client 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,290 @@
1
+ fragment Concept on Concept {
2
+ id
3
+ prefLabel
4
+ url(vanity: $useVanities)
5
+ relativeUrl: url(relative: true, vanity: $useVanities)
6
+ }
7
+
8
+ fragment DisplayConcept on Content {
9
+ metaPrefixText
10
+ metaLink {
11
+ ...Concept
12
+ }
13
+ metaAltLink {
14
+ ...Concept
15
+ }
16
+ }
17
+
18
+ fragment StructuredTree on StructuredContent {
19
+ tree
20
+ }
21
+
22
+ fragment Teaser on Content {
23
+ title
24
+ id
25
+ url
26
+ relativeUrl: url(relative: true)
27
+ type
28
+ publishedDate
29
+ firstPublishedDate
30
+ ...DisplayConcept
31
+ image: mainImage {
32
+ url: binaryUrl
33
+ width: originalWidth
34
+ height: originalHeight
35
+ }
36
+ indicators {
37
+ accessLevel
38
+ isOpinion
39
+ isColumn
40
+ isPodcast
41
+ isEditorsChoice
42
+ isExclusive
43
+ isScoop
44
+ }
45
+ }
46
+
47
+ fragment ImageSource on ImageSource {
48
+ dpr
49
+ width
50
+ url
51
+ }
52
+
53
+ # this fragment is here to provide typescript info about what's
54
+ # in TopperImages. it's not used in the Topper fragment because
55
+ # we need to provide different arguments to sources
56
+ fragment TopperImages on TopperImages {
57
+ standard {
58
+ ...Image
59
+ }
60
+ square {
61
+ ...Image
62
+ }
63
+ fallback {
64
+ ...Image
65
+ }
66
+ wide {
67
+ ...Image
68
+ }
69
+ }
70
+
71
+ fragment Topper on Topper {
72
+ __typename
73
+ headline
74
+ intro {
75
+ source
76
+ structured {
77
+ ...StructuredTree
78
+ }
79
+ }
80
+ displayConcept {
81
+ ...Concept
82
+ }
83
+ backgroundColour
84
+ ... on SplitTextTopper {
85
+ images {
86
+ standard {
87
+ sources(width: 800) {
88
+ ...ImageSource
89
+ }
90
+ minDisplayWidth(width: 1440)
91
+ }
92
+ square {
93
+ sources(width: 720) {
94
+ ...ImageSource
95
+ }
96
+ maxDisplayWidth(width: 1440)
97
+ }
98
+ fallback {
99
+ sources(width: 1440) {
100
+ ...ImageSource
101
+ }
102
+ copyright
103
+ }
104
+ }
105
+ }
106
+ ... on FullBleedTopper {
107
+ images {
108
+ standard {
109
+ sources(width: 1220) {
110
+ ...ImageSource
111
+ }
112
+ minDisplayWidth(width: 491)
113
+ maxDisplayWidth(width: 1220)
114
+ }
115
+ square {
116
+ sources(width: 490) {
117
+ ...ImageSource
118
+ }
119
+ maxDisplayWidth(width: 490)
120
+ }
121
+ wide {
122
+ sources(width: 1440) {
123
+ ...ImageSource
124
+ }
125
+ minDisplayWidth(width: 1440)
126
+ }
127
+ fallback {
128
+ sources(width: 1440) {
129
+ ...ImageSource
130
+ }
131
+ copyright
132
+ }
133
+ }
134
+ }
135
+ ... on OpinionTopper {
136
+ headshot(dpr: 2, width: 150)
137
+ columnist {
138
+ ...Concept
139
+ }
140
+ }
141
+ ... on BrandedTopper {
142
+ brandConcept {
143
+ ...Concept
144
+ }
145
+ }
146
+ ... on TopperWithTheme {
147
+ isLargeHeadline
148
+ layout
149
+ }
150
+ }
151
+
152
+ # this fragment is here to provide typescript info about what's
153
+ # in PictureImages. it's not used in the Picture fragment because
154
+ # we need to provide different arguments to sources
155
+ fragment Image on Image {
156
+ sources {
157
+ ...ImageSource
158
+ }
159
+ minDisplayWidth
160
+ maxDisplayWidth
161
+ originalHeight
162
+ originalWidth
163
+ copyright
164
+ }
165
+
166
+ fragment Picture on Picture {
167
+ __typename
168
+ alt
169
+ caption
170
+ imageType
171
+
172
+ ... on PictureStandard {
173
+ images {
174
+ standard {
175
+ sources(width: 700) {
176
+ ...ImageSource
177
+ }
178
+ originalWidth
179
+ originalHeight
180
+ }
181
+ S: small {
182
+ sources(width: 490) {
183
+ ...ImageSource
184
+ }
185
+ maxDisplayWidth(width: 490)
186
+ originalWidth
187
+ originalHeight
188
+ }
189
+ L: standard {
190
+ sources(width: 540) {
191
+ ...ImageSource
192
+ }
193
+ minDisplayWidth(width: 980)
194
+ maxDisplayWidth(width: 1219)
195
+ originalWidth
196
+ originalHeight
197
+ }
198
+ }
199
+ }
200
+ ... on PictureInline {
201
+ images {
202
+ standard {
203
+ sources(width: 350) {
204
+ ...ImageSource
205
+ }
206
+ originalWidth
207
+ originalHeight
208
+ }
209
+ }
210
+ }
211
+ ... on PictureFullBleed {
212
+ images {
213
+ standard {
214
+ sources(width: 700) {
215
+ ...ImageSource
216
+ }
217
+ originalWidth
218
+ originalHeight
219
+ }
220
+ small {
221
+ sources(width: 490) {
222
+ ...ImageSource
223
+ }
224
+ maxDisplayWidth(width: 490)
225
+ originalWidth
226
+ originalHeight
227
+ }
228
+ large {
229
+ sources(width: 1200) {
230
+ ...ImageSource
231
+ }
232
+ minDisplayWidth
233
+ maxDisplayWidth
234
+ originalWidth
235
+ originalHeight
236
+ }
237
+ }
238
+ }
239
+ }
240
+
241
+ fragment ImageSet on ImageSet {
242
+ picture {
243
+ ...Picture
244
+ }
245
+ }
246
+
247
+ fragment LayoutImage on LayoutImage {
248
+ picture {
249
+ ...Picture
250
+ }
251
+ }
252
+
253
+ fragment Recommended on Recommended {
254
+ title
255
+ teaser {
256
+ ...Teaser
257
+ }
258
+ }
259
+
260
+ fragment ArticleReferences on Reference {
261
+ __typename
262
+ ...Recommended
263
+ ...ImageSet
264
+ ...LayoutImage
265
+ }
266
+
267
+ fragment StructuredContent on StructuredContent {
268
+ ...StructuredTree
269
+
270
+ references {
271
+ ...ArticleReferences
272
+ }
273
+ }
274
+
275
+ query Article($uuid: String!, $useVanities: Boolean!) {
276
+ content(uuid: $uuid) {
277
+ title
278
+ byline {
279
+ tree
280
+ }
281
+ topper {
282
+ ...Topper
283
+ }
284
+ body {
285
+ structured {
286
+ ...StructuredContent
287
+ }
288
+ }
289
+ }
290
+ }