Skip to content

Commit 61ecd39

Browse files
authored
refactor: document data type flow (#1130)
1 parent 5555c20 commit 61ecd39

File tree

56 files changed

+708
-603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+708
-603
lines changed

examples/$/show.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const show = <$Logger extends Logger = typeof console.log>(
99
subTitle?: string,
1010
): ReturnType<$Logger> => {
1111
const write = console.log
12-
const inspected = inspect(value, { depth: null, colors: true })
12+
const inspected = typeof value === 'string' ? value : inspect(value, { depth: null, colors: true })
1313
const message = renderShow(inspected, subTitle)
1414
return write(message) as ReturnType<$Logger>
1515
}

examples/55_generated/generated_arguments__arguments.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { showJson } from '../$/helpers.js'
77

88
const atlas = Pokemon.create()
99

10+
// dprint-ignore
1011
const pokemons = await atlas.query.pokemons({
11-
$: { filter: { name: { in: [`Pikachu`, `Charizard`] } } },
12+
$: { filter: { name: { in: [`Pikachu`, `Charizard`] } } }, // [!code highlight]
1213
name: true,
1314
trainer: { name: true },
1415
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---------------------------------------- SHOW ----------------------------------------
2-
'This operation was aborted'
2+
This operation was aborted

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': '1727319638284'
7+
'x-sent-at-time': '1727365576054'
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': '104',
19-
date: 'Thu, 26 Sep 2024 03:00:38 GMT',
19+
date: 'Thu, 26 Sep 2024 15:46:16 GMT',
2020
connection: 'keep-alive',
2121
'keep-alive': 'timeout=5'
2222
},

examples/__outputs__/20_output/output_envelope_envelope-error__envelope-error.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18)
66
at async Object.run (/some/path/to/main.ts:XX:XX:22)
77
at async run (/some/path/to/client.ts:XX:XX:20)
8-
at async executeRootType (/some/path/to/client.ts:XX:XX:12)
8+
at async executeDocument (/some/path/to/client.ts:XX:XX:12)
99
at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20)
1010
at async <anonymous> (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) {
1111
context: {

examples/__outputs__/20_output/output_envelope_envelope_error-throw__envelope-error-throw.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ContextualError: There was an error in the extension "anonymous" (use named func
77
at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18)
88
at async Object.run (/some/path/to/main.ts:XX:XX:22)
99
at async run (/some/path/to/client.ts:XX:XX:20)
10-
at async executeRootType (/some/path/to/client.ts:XX:XX:12)
10+
at async executeDocument (/some/path/to/client.ts:XX:XX:12)
1111
at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20)
1212
at async <anonymous> (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) {
1313
context: {

examples/__outputs__/20_output/output_return-error.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ContextualError: There was an error in the extension "anonymous" (use named func
33
at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18)
44
at async Object.run (/some/path/to/main.ts:XX:XX:22)
55
at async run (/some/path/to/client.ts:XX:XX:20)
6-
at async executeRootType (/some/path/to/client.ts:XX:XX:12)
6+
at async executeDocument (/some/path/to/client.ts:XX:XX:12)
77
at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20)
88
at async <anonymous> (/some/path/to/output_return-error.ts:XX:XX:18) {
99
context: {

examples/__outputs__/20_output/output_return-error_return-error-execution__return-error-execution.output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ContextualAggregateError: One or more errors in the execution result.
33
at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19)
44
at run (/some/path/to/client.ts:XX:XX:12)
55
at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX)
6-
at async executeRootType (/some/path/to/client.ts:XX:XX:12)
6+
at async executeDocument (/some/path/to/client.ts:XX:XX:12)
77
at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20)
88
at async <anonymous> (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:16) {
99
context: {},
@@ -40,7 +40,7 @@ ContextualError: There was an error in the extension "anonymous" (use named func
4040
at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX)
4141
at async Object.run (/some/path/to/main.ts:XX:XX:22)
4242
at async run (/some/path/to/client.ts:XX:XX:20)
43-
at async executeRootType (/some/path/to/client.ts:XX:XX:12)
43+
at async executeDocument (/some/path/to/client.ts:XX:XX:12)
4444
at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20)
4545
at async <anonymous> (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:3) {
4646
context: {

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: '851f3f771b76e4969a2f8c084f85759d',
13-
parentId: 'ebd5237ad56b820c',
12+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
13+
parentId: 'fb04e4436519eebf',
1414
traceState: undefined,
1515
name: 'encode',
16-
id: 'ff492c55cf5462ff',
16+
id: 'b9cc31cb6dcef7bb',
1717
kind: 0,
18-
timestamp: 1727319638868000,
19-
duration: 1170.584,
18+
timestamp: 1727365576823000,
19+
duration: 586.292,
2020
attributes: {},
2121
status: { code: 0 },
2222
events: [],
@@ -33,14 +33,14 @@
3333
}
3434
},
3535
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
36-
traceId: '851f3f771b76e4969a2f8c084f85759d',
37-
parentId: 'ebd5237ad56b820c',
36+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
37+
parentId: 'fb04e4436519eebf',
3838
traceState: undefined,
3939
name: 'pack',
40-
id: '9174a3424a228e28',
40+
id: 'fb77c65e19244b1f',
4141
kind: 0,
42-
timestamp: 1727319638871000,
43-
duration: 36417.291,
42+
timestamp: 1727365576831000,
43+
duration: 19896.75,
4444
attributes: {},
4545
status: { code: 0 },
4646
events: [],
@@ -57,14 +57,14 @@
5757
}
5858
},
5959
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
60-
traceId: '851f3f771b76e4969a2f8c084f85759d',
61-
parentId: 'ebd5237ad56b820c',
60+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
61+
parentId: 'fb04e4436519eebf',
6262
traceState: undefined,
6363
name: 'exchange',
64-
id: '85de30bd471a1d11',
64+
id: '7e3a75386432d606',
6565
kind: 0,
66-
timestamp: 1727319638909000,
67-
duration: 24460.084,
66+
timestamp: 1727365576852000,
67+
duration: 29439.625,
6868
attributes: {},
6969
status: { code: 0 },
7070
events: [],
@@ -81,14 +81,14 @@
8181
}
8282
},
8383
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
84-
traceId: '851f3f771b76e4969a2f8c084f85759d',
85-
parentId: 'ebd5237ad56b820c',
84+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
85+
parentId: 'fb04e4436519eebf',
8686
traceState: undefined,
8787
name: 'unpack',
88-
id: '81208c873ce84df5',
88+
id: '6263aef06e4164d0',
8989
kind: 0,
90-
timestamp: 1727319638933000,
91-
duration: 1301.541,
90+
timestamp: 1727365576881000,
91+
duration: 1157,
9292
attributes: {},
9393
status: { code: 0 },
9494
events: [],
@@ -105,14 +105,14 @@
105105
}
106106
},
107107
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
108-
traceId: '851f3f771b76e4969a2f8c084f85759d',
109-
parentId: 'ebd5237ad56b820c',
108+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
109+
parentId: 'fb04e4436519eebf',
110110
traceState: undefined,
111111
name: 'decode',
112-
id: '0e084f67d12e45c7',
112+
id: 'f6e875f59111e613',
113113
kind: 0,
114-
timestamp: 1727319638935000,
115-
duration: 199.208,
114+
timestamp: 1727365576883000,
115+
duration: 193.042,
116116
attributes: {},
117117
status: { code: 0 },
118118
events: [],
@@ -129,14 +129,14 @@
129129
}
130130
},
131131
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
132-
traceId: '851f3f771b76e4969a2f8c084f85759d',
132+
traceId: '99a1b00f220469bd559f6fdc09b75cfc',
133133
parentId: undefined,
134134
traceState: undefined,
135135
name: 'request',
136-
id: 'ebd5237ad56b820c',
136+
id: 'fb04e4436519eebf',
137137
kind: 0,
138-
timestamp: 1727319638867000,
139-
duration: 68430.791,
138+
timestamp: 1727365576822000,
139+
duration: 61277.208,
140140
attributes: {},
141141
status: { code: 0 },
142142
events: [],

0 commit comments

Comments
 (0)