Skip to content

Commit 62332a0

Browse files
authored
chore(website): bring back twoslash (#1234)
1 parent c5adaf6 commit 62332a0

File tree

33 files changed

+709
-802
lines changed

33 files changed

+709
-802
lines changed

examples/35_custom-scalar/custom-scalar.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ import { show } from '../$/helpers.js'
99
const graffle = Pokemon
1010
.create()
1111
.scalar(`Date`, {
12-
decode: (value) => new globalThis.Date(value),
13-
encode: (value) => value.toISOString(),
12+
decode: (value: string) => new Date(value),
13+
encode: (value: Date) => value.toISOString(),
1414
})
1515

1616
const pokemons = await graffle.query.pokemons({
1717
$: { filter: { birthday: { lte: new Date(`1987-01-13`) } } },
18+
// ^^^^^^^^^^^^^^^^^^^^^^
1819
name: true,
1920
birthday: true,
2021
})

examples/55_document-builder/document-builder_union.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ const dateFormatter = new Intl.DateTimeFormat(`en-US`, { timeZone: `UTC` })
7070
for (const battle of battles) {
7171
switch (battle.__typename) {
7272
case `BattleRoyale`: {
73-
// eslint-disable-next-line
74-
// @ts-ignore-error fixme
7573
const trainers = battle.combatants?.map(_ => _.trainer?.name)
7674
let info = ``
7775
info += `${battle.__typename} on ${dateFormatter.format(new Date(battle.date ?? 0))}\n`

examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
headers: Headers {
55
accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
66
'content-type': 'application/json',
7-
'x-sent-at-time': '1730036844970'
7+
'x-sent-at-time': '1730084002612'
88
},
99
signal: undefined,
1010
method: 'post',

examples/__outputs__/20_output/output_envelope.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
headers: Headers {
1717
'content-type': 'application/graphql-response+json; charset=utf-8',
1818
'content-length': '142',
19-
date: 'Sun, 27 Oct 2024 13:47:26 GMT',
19+
date: 'Mon, 28 Oct 2024 02:53:23 GMT',
2020
connection: 'keep-alive',
2121
'keep-alive': 'timeout=5'
2222
},

examples/__outputs__/60_extension/extension_opentelemetry__opentelemetry.output.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
}
1010
},
1111
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
12-
traceId: '384833e31759d7c8c990afcdc091163c',
13-
parentId: '02ea45a5cb1a818f',
12+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
13+
parentId: '2ea299a84fb29c28',
1414
traceState: undefined,
1515
name: 'encode',
16-
id: '6165d2d039ddc330',
16+
id: '8e51c21dd5598fa0',
1717
kind: 0,
18-
timestamp: 1730036847285000,
19-
duration: 1356.625,
18+
timestamp: 1730084004129000,
19+
duration: 1373.917,
2020
attributes: {},
2121
status: { code: 0 },
2222
events: [],
@@ -33,14 +33,14 @@
3333
}
3434
},
3535
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
36-
traceId: '384833e31759d7c8c990afcdc091163c',
37-
parentId: '02ea45a5cb1a818f',
36+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
37+
parentId: '2ea299a84fb29c28',
3838
traceState: undefined,
3939
name: 'pack',
40-
id: 'bb6311c736ff6b68',
40+
id: '6637a07a9d49825c',
4141
kind: 0,
42-
timestamp: 1730036847288000,
43-
duration: 12403.5,
42+
timestamp: 1730084004132000,
43+
duration: 15243.042,
4444
attributes: {},
4545
status: { code: 0 },
4646
events: [],
@@ -57,14 +57,14 @@
5757
}
5858
},
5959
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
60-
traceId: '384833e31759d7c8c990afcdc091163c',
61-
parentId: '02ea45a5cb1a818f',
60+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
61+
parentId: '2ea299a84fb29c28',
6262
traceState: undefined,
6363
name: 'exchange',
64-
id: 'd20f5ebfbc8710b0',
64+
id: 'e753b4385e42b648',
6565
kind: 0,
66-
timestamp: 1730036847301000,
67-
duration: 24152.959,
66+
timestamp: 1730084004148000,
67+
duration: 31860.542,
6868
attributes: {},
6969
status: { code: 0 },
7070
events: [],
@@ -81,14 +81,14 @@
8181
}
8282
},
8383
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
84-
traceId: '384833e31759d7c8c990afcdc091163c',
85-
parentId: '02ea45a5cb1a818f',
84+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
85+
parentId: '2ea299a84fb29c28',
8686
traceState: undefined,
8787
name: 'unpack',
88-
id: 'b16337bf48d7aa8a',
88+
id: '1fef254d2f9ea4dc',
8989
kind: 0,
90-
timestamp: 1730036847325000,
91-
duration: 1765.417,
90+
timestamp: 1730084004180000,
91+
duration: 1743.583,
9292
attributes: {},
9393
status: { code: 0 },
9494
events: [],
@@ -105,14 +105,14 @@
105105
}
106106
},
107107
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
108-
traceId: '384833e31759d7c8c990afcdc091163c',
109-
parentId: '02ea45a5cb1a818f',
108+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
109+
parentId: '2ea299a84fb29c28',
110110
traceState: undefined,
111111
name: 'decode',
112-
id: 'd1716e5187f9ee3c',
112+
id: 'afcb093f6aa833d5',
113113
kind: 0,
114-
timestamp: 1730036847327000,
115-
duration: 219.459,
114+
timestamp: 1730084004182000,
115+
duration: 225.25,
116116
attributes: {},
117117
status: { code: 0 },
118118
events: [],
@@ -129,14 +129,14 @@
129129
}
130130
},
131131
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
132-
traceId: '384833e31759d7c8c990afcdc091163c',
132+
traceId: '5ca1327ba8580d760bbbfffe8b50d251',
133133
parentId: undefined,
134134
traceState: undefined,
135135
name: 'request',
136-
id: '02ea45a5cb1a818f',
136+
id: '2ea299a84fb29c28',
137137
kind: 0,
138-
timestamp: 1730036847284000,
139-
duration: 43532.666,
138+
timestamp: 1730084004128000,
139+
duration: 54074.875,
140140
attributes: {},
141141
status: { code: 0 },
142142
events: [],

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
},
153153
"devDependencies": {
154154
"@arethetypeswrong/cli": "^0.16.4",
155-
"@ark/attest": "^0.24.0",
156155
"@dprint/formatter": "^0.4.1",
157156
"@dprint/typescript": "^0.93.0",
158157
"@opentelemetry/api": "^1.9.0",
@@ -165,12 +164,12 @@
165164
"@tsconfig/strictest": "^2.0.5",
166165
"@types/body-parser": "^1.19.5",
167166
"@types/express": "^5.0.0",
168-
"@types/node": "^22.8.0",
167+
"@types/node": "^22.8.1",
169168
"@typescript-eslint/eslint-plugin": "^8.11.0",
170169
"@typescript-eslint/parser": "^8.11.0",
171170
"async-cleanup": "^1.0.0",
172171
"doctoc": "^2.2.1",
173-
"dprint": "^0.47.4",
172+
"dprint": "^0.47.5",
174173
"dripip": "^0.10.0",
175174
"eslint": "^9.13.0",
176175
"eslint-config-prisma": "^0.6.0",
@@ -180,7 +179,7 @@
180179
"eslint-plugin-simple-import-sort": "^12.1.1",
181180
"eslint-plugin-tsdoc": "^0.3.0",
182181
"eslint-typescript": "^1.1.0",
183-
"execa": "^9.4.1",
182+
"execa": "^9.5.0",
184183
"fs-jetpack": "^5.1.0",
185184
"get-port": "^7.1.0",
186185
"globby": "^14.0.2",
@@ -194,7 +193,7 @@
194193
"prettier": "^3.3.3",
195194
"publint": "^0.2.12",
196195
"strip-ansi": "^7.1.0",
197-
"tsx": "^4.19.1",
196+
"tsx": "^4.19.2",
198197
"type-fest": "^4.26.1",
199198
"typescript": "^5.6.3",
200199
"typescript-eslint": "^8.11.0",

0 commit comments

Comments
 (0)