-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypeDefs.txt
More file actions
506 lines (450 loc) · 12.3 KB
/
typeDefs.txt
File metadata and controls
506 lines (450 loc) · 12.3 KB
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
### Type definitions saved at 2021-05-06T17:21:27.626Z ###
type File implements Node @dontInfer {
sourceInstanceName: String!
absolutePath: String!
relativePath: String!
extension: String!
size: Int!
prettySize: String!
modifiedTime: Date! @dateformat
accessTime: Date! @dateformat
changeTime: Date! @dateformat
birthTime: Date! @dateformat
root: String!
dir: String!
base: String!
ext: String!
name: String!
relativeDirectory: String!
dev: Int!
mode: Int!
nlink: Int!
uid: Int!
gid: Int!
rdev: Int!
ino: Float!
atimeMs: Float!
mtimeMs: Float!
ctimeMs: Float!
atime: Date! @dateformat
mtime: Date! @dateformat
ctime: Date! @dateformat
birthtime: Date @deprecated(reason: "Use `birthTime` instead")
birthtimeMs: Float @deprecated(reason: "Use `birthTime` instead")
blksize: Int
blocks: Int
}
type Directory implements Node @dontInfer {
sourceInstanceName: String!
absolutePath: String!
relativePath: String!
extension: String!
size: Int!
prettySize: String!
modifiedTime: Date! @dateformat
accessTime: Date! @dateformat
changeTime: Date! @dateformat
birthTime: Date! @dateformat
root: String!
dir: String!
base: String!
ext: String!
name: String!
relativeDirectory: String!
dev: Int!
mode: Int!
nlink: Int!
uid: Int!
gid: Int!
rdev: Int!
ino: Float!
atimeMs: Float!
mtimeMs: Float!
ctimeMs: Float!
atime: Date! @dateformat
mtime: Date! @dateformat
ctime: Date! @dateformat
birthtime: Date @deprecated(reason: "Use `birthTime` instead")
birthtimeMs: Float @deprecated(reason: "Use `birthTime` instead")
blksize: Int
blocks: Int
}
type Site implements Node @dontInfer {
buildTime: Date @dateformat
siteMetadata: SiteMetadata
port: Int
host: String
polyfill: Boolean
pathPrefix: String
}
type SiteMetadata @derivedTypes {
menuLinks: [MenuLinks]
logo: String
icon: String
title: String
description: String
keywords: [String]
author: String
siteUrl: String
social: [SiteSiteMetadataSocial]
copyright: String
image: String
}
type MenuLinks {
name: String!
link: String!
subMenu: [SubMenu] @defaultSubMenu
type: String
}
type SubMenu {
name: String
link: String
type: String
}
type SiteSiteMetadataSocial {
name: String
value: String
}
type SiteSiteMetadata {
title: String
description: String
}
type SiteFunction implements Node @dontInfer {
apiRoute: String!
originalFilePath: String!
relativeCompiledFilePath: String!
absoluteCompiledFilePath: String!
matchPath: String
}
type SitePage implements Node @dontInfer {
path: String!
component: String!
internalComponentName: String!
componentChunkName: String!
matchPath: String
}
enum ImageFormat {
NO_CHANGE
AUTO
JPG
PNG
WEBP
AVIF
}
enum ImageFit {
COVER
CONTAIN
FILL
INSIDE
OUTSIDE
}
enum ImageLayout {
FIXED
FULL_WIDTH
CONSTRAINED
}
enum ImageCropFocus {
CENTER
NORTH
NORTHEAST
EAST
SOUTHEAST
SOUTH
SOUTHWEST
WEST
NORTHWEST
ENTROPY
ATTENTION
}
input DuotoneGradient {
highlight: String!
shadow: String!
opacity: Int
}
enum PotraceTurnPolicy {
TURNPOLICY_BLACK
TURNPOLICY_WHITE
TURNPOLICY_LEFT
TURNPOLICY_RIGHT
TURNPOLICY_MINORITY
TURNPOLICY_MAJORITY
}
input Potrace {
turnPolicy: PotraceTurnPolicy
turdSize: Float
alphaMax: Float
optCurve: Boolean
optTolerance: Float
threshold: Int
blackOnWhite: Boolean
color: String
background: String
}
type ImageSharpFixed {
base64: String
tracedSVG: String
aspectRatio: Float
width: Float!
height: Float!
src: String!
srcSet: String!
srcWebp: String
srcSetWebp: String
originalName: String
}
type ImageSharpFluid {
base64: String
tracedSVG: String
aspectRatio: Float!
src: String!
srcSet: String!
srcWebp: String
srcSetWebp: String
sizes: String!
originalImg: String
originalName: String
presentationWidth: Int!
presentationHeight: Int!
}
enum ImagePlaceholder {
DOMINANT_COLOR
TRACED_SVG
BLURRED
NONE
}
input BlurredOptions {
"""Width of the generated low-res preview. Default is 20px"""
width: Int
"""
Force the output format for the low-res preview. Default is to use the same
format as the input. You should rarely need to change this
"""
toFormat: ImageFormat
}
input JPGOptions {
quality: Int
progressive: Boolean = true
}
input PNGOptions {
quality: Int
compressionSpeed: Int = 4
}
input WebPOptions {
quality: Int
}
input AVIFOptions {
quality: Int
lossless: Boolean
speed: Int
}
input TransformOptions {
grayscale: Boolean = false
duotone: DuotoneGradient
rotate: Int = 0
trim: Float = 0
cropFocus: ImageCropFocus = ATTENTION
fit: ImageFit = COVER
}
type ImageSharpOriginal {
width: Float
height: Float
src: String
}
type ImageSharpResize {
src: String
tracedSVG: String
width: Int
height: Int
aspectRatio: Float
originalName: String
}
type ImageSharp implements Node @childOf(types: ["File"]) @dontInfer {
fixed(width: Int, height: Int, base64Width: Int, jpegProgressive: Boolean = true, pngCompressionSpeed: Int = 4, grayscale: Boolean = false, duotone: DuotoneGradient, traceSVG: Potrace, quality: Int, jpegQuality: Int, pngQuality: Int, webpQuality: Int, toFormat: ImageFormat = AUTO, toFormatBase64: ImageFormat = AUTO, cropFocus: ImageCropFocus = ATTENTION, fit: ImageFit = COVER, background: String = "rgba(0,0,0,1)", rotate: Int = 0, trim: Float = 0): ImageSharpFixed
fluid(
maxWidth: Int
maxHeight: Int
base64Width: Int
grayscale: Boolean = false
jpegProgressive: Boolean = true
pngCompressionSpeed: Int = 4
duotone: DuotoneGradient
traceSVG: Potrace
quality: Int
jpegQuality: Int
pngQuality: Int
webpQuality: Int
toFormat: ImageFormat = AUTO
toFormatBase64: ImageFormat = AUTO
cropFocus: ImageCropFocus = ATTENTION
fit: ImageFit = COVER
background: String = "rgba(0,0,0,1)"
rotate: Int = 0
trim: Float = 0
sizes: String = ""
"""
A list of image widths to be generated. Example: [ 200, 340, 520, 890 ]
"""
srcSetBreakpoints: [Int] = []
): ImageSharpFluid
gatsbyImageData(
"""
The layout for the image.
FIXED: A static image sized, that does not resize according to the screen width
FULL_WIDTH: The image resizes to fit its container. Pass a "sizes" option if
it isn't going to be the full width of the screen.
CONSTRAINED: Resizes to fit its container, up to a maximum width, at which point it will remain fixed in size.
"""
layout: ImageLayout = CONSTRAINED
"""
The display width of the generated image for layout = FIXED, and the maximum
display width of the largest image for layout = CONSTRAINED.
Ignored if layout = FLUID.
"""
width: Int
"""
The display height of the generated image for layout = FIXED, and the
maximum display height of the largest image for layout = CONSTRAINED.
The image will be cropped if the aspect ratio does not match the source
image. If omitted, it is calculated from the supplied width,
matching the aspect ratio of the source image.
"""
height: Int
"""
If set along with width or height, this will set the value of the other
dimension to match the provided aspect ratio, cropping the image if needed.
If neither width or height is provided, height will be set based on the intrinsic width of the source image.
"""
aspectRatio: Float
"""
Format of generated placeholder image, displayed while the main image loads.
BLURRED: a blurred, low resolution image, encoded as a base64 data URI (default)
DOMINANT_COLOR: a solid color, calculated from the dominant color of the image.
TRACED_SVG: a low-resolution traced SVG of the image.
NONE: no placeholder. Set "background" to use a fixed background color.
"""
placeholder: ImagePlaceholder
"""
Options for the low-resolution placeholder image. Set placeholder to "BLURRED" to use this
"""
blurredOptions: BlurredOptions
"""
Options for traced placeholder SVGs. You also should set placeholder to "TRACED_SVG".
"""
tracedSVGOptions: Potrace
"""
The image formats to generate. Valid values are "AUTO" (meaning the same
format as the source image), "JPG", "PNG", "WEBP" and "AVIF".
The default value is [AUTO, WEBP], and you should rarely need to change
this. Take care if you specify JPG or PNG when you do
not know the formats of the source images, as this could lead to unwanted
results such as converting JPEGs to PNGs. Specifying
both PNG and JPG is not supported and will be ignored.
"""
formats: [ImageFormat]
"""
A list of image pixel densities to generate. It will never generate images
larger than the source, and will always include a 1x image.
Default is [ 1, 2 ] for FIXED images, meaning 1x and 2x and [0.25, 0.5, 1,
2] for CONSTRAINED. In this case, an image with a constrained layout
and width = 400 would generate images at 100, 200, 400 and 800px wide.
Ignored for FULL_WIDTH images, which use breakpoints instead
"""
outputPixelDensities: [Float]
"""
Specifies the image widths to generate. For FIXED and CONSTRAINED images it
is better to allow these to be determined automatically,
based on the image size. For FULL_WIDTH images this can be used to override
the default, which is [750, 1080, 1366, 1920].
It will never generate any images larger than the source.
"""
breakpoints: [Int]
"""
The "sizes" property, passed to the img tag. This describes the display size of the image.
This does not affect the generated images, but is used by the browser to decide which images to download.
You should usually leave this blank, and a suitable value will be calculated. The exception is if a FULL_WIDTH image
does not actually span the full width of the screen, in which case you should pass the correct size here.
"""
sizes: String
"""The default quality. This is overridden by any format-specific options"""
quality: Int
"""Options to pass to sharp when generating JPG images."""
jpgOptions: JPGOptions
"""Options to pass to sharp when generating PNG images."""
pngOptions: PNGOptions
"""Options to pass to sharp when generating WebP images."""
webpOptions: WebPOptions
"""Options to pass to sharp when generating AVIF images."""
avifOptions: AVIFOptions
"""
Options to pass to sharp to control cropping and other image manipulations.
"""
transformOptions: TransformOptions
"""
Background color applied to the wrapper. Also passed to sharp to use as a
background when "letterboxing" an image to another aspect ratio.
"""
backgroundColor: String
): JSON!
original: ImageSharpOriginal
resize(width: Int, height: Int, quality: Int, jpegQuality: Int, pngQuality: Int, webpQuality: Int, jpegProgressive: Boolean = true, pngCompressionLevel: Int = 9, pngCompressionSpeed: Int = 4, grayscale: Boolean = false, duotone: DuotoneGradient, base64: Boolean = false, traceSVG: Potrace, toFormat: ImageFormat = AUTO, cropFocus: ImageCropFocus = ATTENTION, fit: ImageFit = COVER, background: String = "rgba(0,0,0,1)", rotate: Int = 0, trim: Float = 0): ImageSharpResize
}
type Mdx implements Node @childOf(mimeTypes: ["text/markdown", "text/x-markdown"], types: ["File"]) @dontInfer {
frontmatter: MdxFrontmatter
rawBody: String!
fileAbsolutePath: String!
slug: String
body: String!
excerpt(pruneLength: Int = 140, truncate: Boolean = false): String!
headings(depth: HeadingsMdx): [MdxHeadingMdx]
html: String
mdxAST: JSON
tableOfContents(maxDepth: Int): JSON
timeToRead: Int
wordCount: MdxWordCount
}
type MdxFrontmatter @derivedTypes {
title: String!
draft: Boolean
path: String
meta: MdxFrontmatterSeo
hero: File @fileByRelativePath
}
type MdxFrontmatterSeo {
title: String
description: String
image: File @fileByRelativePath
}
type MdxHeadingMdx {
value: String
depth: Int
}
enum HeadingsMdx {
h1
h2
h3
h4
h5
h6
}
type MdxWordCount {
paragraphs: Int
sentences: Int
words: Int
}
type Frontmatter {
title: String
draft: Boolean
path: String!
alias: String
lang: String
template: String
meta: SeoFrontmatter
embeddedImages: [File] @fileByRelativePath
}
type SeoFrontmatter {
title: String
description: String
keywords: String
image: String
isBlogPost: Boolean
}