From 95f9ded33b278668c54c2138ce373354c72e6020 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Wed, 25 Sep 2024 15:12:04 -0400 Subject: [PATCH 1/3] refactor: anyware error passthrough --- src/layers/5_core/core.ts | 15 +++++++++ src/layers/6_client/handleOutput.ts | 14 -------- src/lib/anyware/main.test.ts | 51 ++++++++++++++++++++++++++++- src/lib/anyware/main.ts | 6 +++- src/lib/anyware/runHook.ts | 12 ++++++- src/lib/anyware/runPipeline.ts | 15 +++++++++ src/lib/anyware/specHelpers.ts | 15 ++++++--- 7 files changed, 107 insertions(+), 21 deletions(-) diff --git a/src/layers/5_core/core.ts b/src/layers/5_core/core.ts index b12ff15f7..ae9cc0a72 100644 --- a/src/layers/5_core/core.ts +++ b/src/layers/5_core/core.ts @@ -28,6 +28,14 @@ import { import { type HookMap, hookNamesOrderedBySequence, type HookSequence } from './hooks.js' export const anyware = Anyware.create({ + // If core errors caused by an abort error then raise it as a direct error. + // This is an expected possible error. Possible when user cancels a request. + passthroughErrorWith: (signal) => { + // todo have anyware propagate the input that was passed to the hook that failed. + // it will give us a bit more confidence that we're only allowing this abort error for fetch requests stuff + // context.config.transport.type === Transport.http + return signal.hookName === `exchange` && isAbortError(signal.error) + }, hookNamesOrderedBySequence, hooks: { encode: ({ input }) => { @@ -257,3 +265,10 @@ export type Core<$Config extends Config = Config> = Anyware.Core< HookMap<$Config>, GraffleExecutionResultVar<$Config> > + +const isAbortError = (error: any): error is DOMException & { name: 'AbortError' } => { + return (error instanceof DOMException && error.name === `AbortError`) + // Under test with JSDOM, the error must be checked this way. + // todo look for an open issue with JSDOM to link here, is this just artifact of JSDOM or is it a real issue that happens in browsers? + || (error instanceof Error && error.message.startsWith(`AbortError:`)) +} diff --git a/src/layers/6_client/handleOutput.ts b/src/layers/6_client/handleOutput.ts index 1f694aa04..3ce393649 100644 --- a/src/layers/6_client/handleOutput.ts +++ b/src/layers/6_client/handleOutput.ts @@ -4,7 +4,6 @@ import { Errors } from '../../lib/errors/__.js' import type { GraphQLExecutionResultError } from '../../lib/graphql.js' import { isRecordLikeObject, type SimplifyExceptError, type Values } from '../../lib/prelude.js' import type { Schema } from '../1_Schema/__.js' -import { Transport } from '../5_core/types.js' import type { ErrorsOther, GraffleExecutionResultVar, InterfaceTypedRequestContext, RequestContext } from './client.js' import { type Config, @@ -18,12 +17,6 @@ export const handleOutput = ( context: RequestContext, result: GraffleExecutionResultVar, ) => { - // If core errors caused by an abort error then raise it as a direct error. - // This is an expected possible error. Possible when user cancels a request. - if (context.config.transport.type === Transport.http && result instanceof Error && isAbortError(result.cause)) { - result = result.cause - } - if (isContextConfigTraditionalGraphQLOutput(context.config)) { if (result instanceof Error) throw result return result @@ -119,13 +112,6 @@ export const handleOutput = ( return result.data } -const isAbortError = (error: any): error is DOMException & { name: 'AbortError' } => { - return (error instanceof DOMException && error.name === `AbortError`) - // Under test with JSDOM, the error must be checked this way. - // todo look for an open issue with JSDOM to link here, is this just artifact of JSDOM or is it a real issue that happens in browsers? - || (error instanceof Error && error.message.startsWith(`AbortError:`)) -} - const isTypedContext = (context: RequestContext): context is InterfaceTypedRequestContext => `schemaIndex` in context /** diff --git a/src/lib/anyware/main.test.ts b/src/lib/anyware/main.test.ts index bbb040a4e..c77b407a5 100644 --- a/src/lib/anyware/main.test.ts +++ b/src/lib/anyware/main.test.ts @@ -3,8 +3,9 @@ import { describe, expect, test, vi } from 'vitest' import { Errors } from '../errors/__.js' import type { ContextualError } from '../errors/ContextualError.js' +import { Anyware } from './__.js' import { createRetryingExtension } from './main.js' -import { core, oops, run, runWithOptions } from './specHelpers.js' +import { core, createHook, type Input, oops, run, runWithOptions } from './specHelpers.js' describe(`no extensions`, () => { test(`passthrough to implementation`, async () => { @@ -243,6 +244,54 @@ describe(`errors`, () => { } `) }) + describe('certain errors can be configured to be re-thrown without wrapping error', () => { + class SpecialError1 extends Error {} + class SpecialError2 extends Error {} + const a = createHook({ + slots: {}, + run: ({ input }: { slots: object; input: { throws: Error } }) => { + if (input.throws) throw input.throws + }, + }) + + test('via passthroughErrorInstanceOf (one)', async () => { + const anyware = Anyware.create<['a'], Anyware.HookMap<['a']>>({ + hookNamesOrderedBySequence: [`a`], + hooks: { a }, + passthroughErrorInstanceOf: [SpecialError1], + }) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new Error('oops') }, extensions: [] })).resolves.toBeInstanceOf(Errors.ContextualError) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new SpecialError1('oops') }, extensions: [] })).resolves.toBeInstanceOf(SpecialError1) + }) + test('via passthroughErrorInstanceOf (multiple)', async () => { + const anyware = Anyware.create<['a'], Anyware.HookMap<['a']>>({ + hookNamesOrderedBySequence: [`a`], + hooks: { a }, + passthroughErrorInstanceOf: [SpecialError1, SpecialError2], + }) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new Error('oops') }, extensions: [] })).resolves.toBeInstanceOf(Errors.ContextualError) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new SpecialError2('oops') }, extensions: [] })).resolves.toBeInstanceOf(SpecialError2) + }) + test('via passthroughWith', async () => { + const anyware = Anyware.create<['a'], Anyware.HookMap<['a']>>({ + hookNamesOrderedBySequence: [`a`], + hooks: { a }, + // todo type-safe hook name according to values passed to constructor + // todo type-tests on signal { hookName, source, error } + passthroughErrorWith: (signal) => { + return signal.error instanceof SpecialError1 + }, + }) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new Error('oops') }, extensions: [] })).resolves.toBeInstanceOf(Errors.ContextualError) + // dprint-ignore + expect(anyware.run({ initialInput: { throws: new SpecialError1('oops') }, extensions: [] })).resolves.toBeInstanceOf(SpecialError1) + }) + }) }) describe('retrying extension', () => { diff --git a/src/lib/anyware/main.ts b/src/lib/anyware/main.ts index 45722718f..779b156d7 100644 --- a/src/lib/anyware/main.ts +++ b/src/lib/anyware/main.ts @@ -3,7 +3,7 @@ import { partitionAndAggregateErrors } from '../errors/ContextualAggregateError. import type { Deferred, FindValueAfter, IsLastValue, MaybePromise } from '../prelude.js' import { casesExhausted, createDeferred } from '../prelude.js' import { getEntrypoint } from './getEntrypoint.js' -import type { HookResultErrorExtension } from './runHook.js' +import type { HookResultError, HookResultErrorExtension } from './runHook.js' import { runPipeline } from './runPipeline.js' type HookSequence = readonly [string, ...string[]] @@ -134,6 +134,8 @@ export type Core< > } } + passthroughErrorInstanceOf?: CoreInput['passthroughErrorInstanceOf'] + passthroughErrorWith?: CoreInput['passthroughErrorWith'] } export type CoreInput< @@ -162,6 +164,8 @@ export type CoreInput< > } } + passthroughErrorInstanceOf?: Function[] + passthroughErrorWith?: (signal: HookResultError) => boolean } export type HookName = string diff --git a/src/lib/anyware/runHook.ts b/src/lib/anyware/runHook.ts index ad98d7841..76d306e5e 100644 --- a/src/lib/anyware/runHook.ts +++ b/src/lib/anyware/runHook.ts @@ -10,10 +10,20 @@ export type HookResultErrorAsync = Deferred export type HookResult = | { type: 'completed'; result: unknown; nextExtensionsStack: readonly Extension[] } | { type: 'shortCircuited'; result: unknown } - | { type: 'error'; hookName: string; source: 'user'; error: Errors.ContextualError; extensionName: string } + | HookResultErrorUser | HookResultErrorImplementation | HookResultErrorExtension +export type HookResultError = HookResultErrorExtension | HookResultErrorImplementation | HookResultErrorUser + +export type HookResultErrorUser = { + type: 'error' + hookName: string + source: 'user' + error: Errors.ContextualError + extensionName: string +} + export type HookResultErrorExtension = { type: 'error' hookName: string diff --git a/src/lib/anyware/runPipeline.ts b/src/lib/anyware/runPipeline.ts index c8687d866..d89c76619 100644 --- a/src/lib/anyware/runPipeline.ts +++ b/src/lib/anyware/runPipeline.ts @@ -62,6 +62,20 @@ export const runPipeline = async ( } case `error`: { debug(`signal: error`) + signal + + if (core.passthroughErrorWith) { + if (core.passthroughErrorWith(signal)) { + return signal.error as any // todo change return type to be unknown since this function could permit anything? + } + } + + if (core.passthroughErrorInstanceOf) { + if (core.passthroughErrorInstanceOf.some(_ => signal.error instanceof _)) { + return signal.error as any // todo change return type to include object... given this instanceof permits that? + } + } + const wasAsync = asyncErrorDeferred.isResolved() // todo type test for this possible return value switch (signal.source) { @@ -73,6 +87,7 @@ export const runPipeline = async ( const message = wasAsync ? `There was an error in the extension "${signal.extensionName}"${nameTip}.` : `There was an error in the extension "${signal.extensionName}"${nameTip} while running hook "${signal.hookName}".` + return new ContextualError(message, { hookName: signal.hookName, source: signal.source, diff --git a/src/lib/anyware/specHelpers.ts b/src/lib/anyware/specHelpers.ts index bc6cca019..68e8f3abb 100644 --- a/src/lib/anyware/specHelpers.ts +++ b/src/lib/anyware/specHelpers.ts @@ -29,8 +29,15 @@ type $Core = ReturnType & { } } +export const createHook = <$Slots extends object, $Input extends object, $Result = unknown>( + $Hook: { + slots: $Slots + run: (input: { input: $Input; slots: $Slots }) => $Result + }, +) => $Hook + export const createAnyware = () => { - const a = { + const a = createHook({ slots: { append: vi.fn().mockImplementation((hookName: string) => { return hookName @@ -43,8 +50,8 @@ export const createAnyware = () => { const extra = slots.appendExtra(`a`) return { value: input.value + `+` + slots.append(`a`) + extra } }), - } - const b = { + }) + const b = createHook({ slots: { append: vi.fn().mockImplementation((hookName: string) => { return hookName @@ -57,7 +64,7 @@ export const createAnyware = () => { const extra = slots.appendExtra(`b`) return { value: input.value + `+` + slots.append(`b`) + extra } }), - } + }) return Anyware.create<['a', 'b'], Anyware.HookMap<['a', 'b']>, Input>({ hookNamesOrderedBySequence: [`a`, `b`], From 5e637ed8e4bd0e73e418eee25f2a9cb383c75af6 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Wed, 25 Sep 2024 15:15:00 -0400 Subject: [PATCH 2/3] doc --- src/lib/anyware/main.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/anyware/main.ts b/src/lib/anyware/main.ts index 779b156d7..223d65bec 100644 --- a/src/lib/anyware/main.ts +++ b/src/lib/anyware/main.ts @@ -164,7 +164,21 @@ export type CoreInput< > } } + /** + * If a hook results in a thrown error but is an instance of one of these classes then return it as-is + * rather than wrapping it in a ContextualError. + * + * This can be useful when there are known kinds of errors such as Abort Errors from AbortController + * which are actually a signaling mechanism. + */ passthroughErrorInstanceOf?: Function[] + /** + * If a hook results in a thrown error but returns true from this function then return the error as-is + * rather than wrapping it in a ContextualError. + * + * This can be useful when there are known kinds of errors such as Abort Errors from AbortController + * which are actually a signaling mechanism. + */ passthroughErrorWith?: (signal: HookResultError) => boolean } From dc0793aea65e5ea146f77bd81aac421f5f2abe01 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Wed, 25 Sep 2024 15:19:07 -0400 Subject: [PATCH 3/3] fixes --- ...tension_headers__dynamicHeaders.output.txt | 2 +- .../20_output/output_envelope.output.txt | 7 +-- ..._envelope-error__envelope-error.output.txt | 16 ++--- ...ror-throw__envelope-error-throw.output.txt | 18 +++--- ...output_preset__standard-graphql.output.txt | 36 +++++------ .../20_output/output_return-error.output.txt | 16 ++--- ...ecution__return-error-execution.output.txt | 34 +++++------ ...DocumentNode__raw-document-node.output.txt | 20 +++--- ...yware_slot_slot-body__slot-body.output.txt | 2 +- ...t_slot-body__slot-search-params.output.txt | 30 ++++----- ...on_opentelemetry__opentelemetry.output.txt | 61 +++++++++---------- .../generate-examples-derivatives/helpers.ts | 2 +- .../content/_snippets/example-links/raw.md | 2 +- .../examples/anyware/slot-body.detail.md | 3 +- .../_snippets/examples/anyware/slot-body.md | 3 +- .../anyware/slot-search-params.detail.md | 30 ++++----- .../examples/anyware/slot-search-params.md | 30 ++++----- .../extension/opentelemetry.detail.md | 61 +++++++++---------- .../examples/extension/opentelemetry.md | 61 +++++++++---------- .../examples/output/default.detail.md | 3 +- .../_snippets/examples/output/default.md | 3 +- .../output/envelope-error-throw.detail.md | 18 +++--- .../examples/output/envelope-error-throw.md | 18 +++--- .../examples/output/envelope-error.detail.md | 16 ++--- .../examples/output/envelope-error.md | 16 ++--- .../examples/output/envelope.detail.md | 7 +-- .../_snippets/examples/output/envelope.md | 7 +-- .../output/return-error-execution.detail.md | 34 +++++------ .../examples/output/return-error-execution.md | 34 +++++------ .../examples/output/return-error.detail.md | 16 ++--- .../_snippets/examples/output/return-error.md | 16 ++--- .../output/standard-graphql.detail.md | 36 +++++------ .../examples/output/standard-graphql.md | 36 +++++------ .../examples/raw/raw-document-node.detail.md | 20 +++--- .../examples/raw/raw-document-node.md | 20 +++--- .../examples/raw/raw-string.detail.md | 3 +- .../_snippets/examples/raw/raw-string.md | 3 +- .../transport-http/dynamic-headers.detail.md | 2 +- .../transport-http/dynamic-headers.md | 2 +- .../10_transport-http/dynamic-headers.md | 2 +- website/content/examples/20_output/default.md | 3 +- .../20_output/envelope-error-throw.md | 18 +++--- .../examples/20_output/envelope-error.md | 16 ++--- .../content/examples/20_output/envelope.md | 7 +-- .../20_output/return-error-execution.md | 34 +++++------ .../examples/20_output/return-error.md | 16 ++--- .../examples/20_output/standard-graphql.md | 36 +++++------ .../examples/30_raw/raw-document-node.md | 20 +++--- website/content/examples/30_raw/raw-string.md | 3 +- .../content/examples/50_anyware/slot-body.md | 3 +- .../examples/50_anyware/slot-search-params.md | 30 ++++----- .../examples/60_extension/opentelemetry.md | 61 +++++++++---------- 52 files changed, 488 insertions(+), 505 deletions(-) diff --git a/examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt b/examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt index bf860abb0..37f474a1e 100644 --- a/examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt +++ b/examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt @@ -4,7 +4,7 @@ headers: Headers { accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8', 'content-type': 'application/json', - 'x-sent-at-time': '1727285962935' + 'x-sent-at-time': '1727291929241' }, signal: undefined, method: 'post', diff --git a/examples/__outputs__/20_output/output_envelope.output.txt b/examples/__outputs__/20_output/output_envelope.output.txt index fbabeebb8..fc4008eb1 100644 --- a/examples/__outputs__/20_output/output_envelope.output.txt +++ b/examples/__outputs__/20_output/output_envelope.output.txt @@ -5,8 +5,7 @@ { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] }, errors: undefined, @@ -16,8 +15,8 @@ statusText: 'OK', headers: Headers { 'content-type': 'application/graphql-response+json; charset=utf-8', - 'content-length': '120', - date: 'Wed, 25 Sep 2024 17:39:23 GMT', + 'content-length': '104', + date: 'Wed, 25 Sep 2024 19:18:49 GMT', connection: 'keep-alive', 'keep-alive': 'timeout=5' }, diff --git a/examples/__outputs__/20_output/output_envelope_envelope-error__envelope-error.output.txt b/examples/__outputs__/20_output/output_envelope_envelope-error__envelope-error.output.txt index c5022747e..f17b80add 100644 --- a/examples/__outputs__/20_output/output_envelope_envelope-error__envelope-error.output.txt +++ b/examples/__outputs__/20_output/output_envelope_envelope-error__envelope-error.output.txt @@ -2,20 +2,20 @@ { errors: [ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ] } \ No newline at end of file diff --git a/examples/__outputs__/20_output/output_envelope_envelope_error-throw__envelope-error-throw.output.txt b/examples/__outputs__/20_output/output_envelope_envelope_error-throw__envelope-error-throw.output.txt index a7f4c9d11..613f15351 100644 --- a/examples/__outputs__/20_output/output_envelope_envelope_error-throw__envelope-error-throw.output.txt +++ b/examples/__outputs__/20_output/output_envelope_envelope_error-throw__envelope-error-throw.output.txt @@ -1,23 +1,23 @@ -/some/path/to/runPipeline.ts:76 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { ^ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX \ No newline at end of file diff --git a/examples/__outputs__/20_output/output_preset__standard-graphql.output.txt b/examples/__outputs__/20_output/output_preset__standard-graphql.output.txt index ce9777565..5513762fd 100644 --- a/examples/__outputs__/20_output/output_preset__standard-graphql.output.txt +++ b/examples/__outputs__/20_output/output_preset__standard-graphql.output.txt @@ -1,34 +1,34 @@ -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "exchange". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) ... 3 lines matching cause stack trace ... - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX) { + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX:16) { context: { hookName: 'exchange', source: 'implementation' }, [cause]: TypeError: Failed to parse URL from ... at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) + at Object.run (/some/path/to/core.ts:XX:XX:29) ... 6 lines matching cause stack trace ... - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) { [cause]: TypeError: Invalid URL at new URL (node:internal/url:XX:XX) at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) { + at Object.run (/some/path/to/core.ts:XX:XX:29) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:8) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:20) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) { code: 'ERR_INVALID_URL', input: '...' } diff --git a/examples/__outputs__/20_output/output_return-error.output.txt b/examples/__outputs__/20_output/output_return-error.output.txt index 4a651cdc2..071c51d4e 100644 --- a/examples/__outputs__/20_output/output_return-error.output.txt +++ b/examples/__outputs__/20_output/output_return-error.output.txt @@ -1,17 +1,17 @@ ---------------------------------------- SHOW ---------------------------------------- ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error.ts:XX:XX:18) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } \ No newline at end of file diff --git a/examples/__outputs__/20_output/output_return-error_return-error-execution__return-error-execution.output.txt b/examples/__outputs__/20_output/output_return-error_return-error-execution__return-error-execution.output.txt index 7b914147a..fa568874a 100644 --- a/examples/__outputs__/20_output/output_return-error_return-error-execution__return-error-execution.output.txt +++ b/examples/__outputs__/20_output/output_return-error_return-error-execution__return-error-execution.output.txt @@ -1,11 +1,11 @@ ---------------------------------------- SHOW ---------------------------------------- ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:16) { context: {}, cause: undefined, errors: [ @@ -22,12 +22,12 @@ ContextualAggregateError: One or more errors in the execution result. ] } ] - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: [ 'addPokemon' ], locations: undefined, extensions: [Object: null prototype] {} @@ -36,20 +36,20 @@ ContextualAggregateError: One or more errors in the execution result. } ---------------------------------------- SHOW ---------------------------------------- ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:3) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:13) + at applyBody (/some/path/to/main.ts:XX:XX:28) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) } \ No newline at end of file diff --git a/examples/__outputs__/30_raw/raw_rawDocumentNode__raw-document-node.output.txt b/examples/__outputs__/30_raw/raw_rawDocumentNode__raw-document-node.output.txt index bf30d9b3b..447197dda 100644 --- a/examples/__outputs__/30_raw/raw_rawDocumentNode__raw-document-node.output.txt +++ b/examples/__outputs__/30_raw/raw_rawDocumentNode__raw-document-node.output.txt @@ -1,25 +1,25 @@ -/some/path/to/handleOutput.ts:60 +/some/path/to/handleOutput.ts:XX:XX const error = new Errors.ContextualAggregateError( ^ ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Proxy.raw (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Proxy.raw (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX:14) { context: {}, cause: undefined, errors: [ GraphQLError: Cannot query field "continent" on type "Pokemon". - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: undefined, locations: undefined, extensions: [Object: null prototype] {} diff --git a/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-body.output.txt b/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-body.output.txt index 9937ff0d2..bbe92c58c 100644 --- a/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-body.output.txt +++ b/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-body.output.txt @@ -6,4 +6,4 @@ { name: 'Squirtle' }, { name: 'Bulbasaur' } ] -} +} \ No newline at end of file diff --git a/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-search-params.output.txt b/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-search-params.output.txt index e2c4415a5..cea0de9ce 100644 --- a/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-search-params.output.txt +++ b/examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-search-params.output.txt @@ -1,25 +1,25 @@ -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "pack". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:16) { context: { hookName: 'pack', source: 'implementation' }, cause: Error: Unexpected null value. - at throwNull (/some/path/to/prelude.ts:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at throwNull (/some/path/to/prelude.ts:XX:XX:29) + at Object.run (/some/path/to/core.ts:XX:XX:35) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at (/some/path/to/runHook.ts:XX:XX:14) + at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:18) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX \ No newline at end of file diff --git a/examples/__outputs__/60_extension/extension_opentelemetry__opentelemetry.output.txt b/examples/__outputs__/60_extension/extension_opentelemetry__opentelemetry.output.txt index 233072cf6..4f727d2e8 100644 --- a/examples/__outputs__/60_extension/extension_opentelemetry__opentelemetry.output.txt +++ b/examples/__outputs__/60_extension/extension_opentelemetry__opentelemetry.output.txt @@ -9,14 +9,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'encode', - id: 'b73a6173a06457b8', + id: 'dcdd7c9ea7a24491', kind: 0, - timestamp: 1727285964122000, - duration: 586.208, + timestamp: 1727291930021000, + duration: 1392.459, attributes: {}, status: { code: 0 }, events: [], @@ -33,14 +33,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'pack', - id: '72e04ccbdff7501a', + id: 'd1ca1155f050f30c', kind: 0, - timestamp: 1727285964124000, - duration: 10593.375, + timestamp: 1727291930024000, + duration: 16745.417, attributes: {}, status: { code: 0 }, events: [], @@ -57,14 +57,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'exchange', - id: 'fa5128aec0e959ca', + id: 'c9978fd02d8f3228', kind: 0, - timestamp: 1727285964135000, - duration: 20171.708, + timestamp: 1727291930042000, + duration: 24516.084, attributes: {}, status: { code: 0 }, events: [], @@ -81,14 +81,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'unpack', - id: '09cd546669f80741', + id: '663a79043ef1feea', kind: 0, - timestamp: 1727285964155000, - duration: 1131.833, + timestamp: 1727291930067000, + duration: 1665.125, attributes: {}, status: { code: 0 }, events: [], @@ -105,14 +105,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'decode', - id: '7df87c3b794416da', + id: '9fd8d38e892a7a50', kind: 0, - timestamp: 1727285964157000, - duration: 182.958, + timestamp: 1727291930068000, + duration: 184.333, attributes: {}, status: { code: 0 }, events: [], @@ -129,14 +129,14 @@ } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', + traceId: '9d154073558dfe77a07840d133b4358c', parentId: undefined, traceState: undefined, name: 'request', - id: 'edf254d33dc1a8ab', + id: '57916921f30d3744', kind: 0, - timestamp: 1727285964121000, - duration: 36185.667, + timestamp: 1727291930020000, + duration: 48270.291, attributes: {}, status: { code: 0 }, events: [], @@ -148,7 +148,6 @@ { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } \ No newline at end of file diff --git a/scripts/generate-examples-derivatives/helpers.ts b/scripts/generate-examples-derivatives/helpers.ts index 11a55668a..eb1ae4723 100644 --- a/scripts/generate-examples-derivatives/helpers.ts +++ b/scripts/generate-examples-derivatives/helpers.ts @@ -199,7 +199,7 @@ export const runExample = async (filePath: string) => { export const rewriteDynamicError = (value: string) => { return value - .replaceAll(/\/.*\/(.+)\.ts/g, `/some/path/to/$1.ts`) + .replaceAll(/\/.*\/(.+)\.ts(:?:\d+)?/g, `/some/path/to/$1.ts:XX:XX`) // When Node.js process exits via an uncaught thrown error, version is printed at bottom. .replaceAll(/Node\.js v.+/g, `Node.js vXX.XX.XX`) .replaceAll(/(.+):\d+:\d+\)/g, `$1:XX:XX)`) diff --git a/website/content/_snippets/example-links/raw.md b/website/content/_snippets/example-links/raw.md index ea6f96190..bb1caa8bb 100644 --- a/website/content/_snippets/example-links/raw.md +++ b/website/content/_snippets/example-links/raw.md @@ -1 +1 @@ - + diff --git a/website/content/_snippets/examples/anyware/slot-body.detail.md b/website/content/_snippets/examples/anyware/slot-body.detail.md index 517e98c54..0d776a6c1 100644 --- a/website/content/_snippets/examples/anyware/slot-body.detail.md +++ b/website/content/_snippets/examples/anyware/slot-body.detail.md @@ -45,8 +45,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/anyware/slot-body.md b/website/content/_snippets/examples/anyware/slot-body.md index bcf39b1cc..bc086dc34 100644 --- a/website/content/_snippets/examples/anyware/slot-body.md +++ b/website/content/_snippets/examples/anyware/slot-body.md @@ -43,8 +43,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/anyware/slot-search-params.detail.md b/website/content/_snippets/examples/anyware/slot-search-params.detail.md index bdd6ee215..951e069ac 100644 --- a/website/content/_snippets/examples/anyware/slot-search-params.detail.md +++ b/website/content/_snippets/examples/anyware/slot-search-params.detail.md @@ -40,28 +40,28 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "pack". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:16) { context: { hookName: 'pack', source: 'implementation' }, cause: Error: Unexpected null value. - at throwNull (/some/path/to/prelude.ts:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at throwNull (/some/path/to/prelude.ts:XX:XX:29) + at Object.run (/some/path/to/core.ts:XX:XX:35) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at (/some/path/to/runHook.ts:XX:XX:14) + at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:18) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/_snippets/examples/anyware/slot-search-params.md b/website/content/_snippets/examples/anyware/slot-search-params.md index c65aae7fd..bd2469fe8 100644 --- a/website/content/_snippets/examples/anyware/slot-search-params.md +++ b/website/content/_snippets/examples/anyware/slot-search-params.md @@ -38,28 +38,28 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "pack". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:16) { context: { hookName: 'pack', source: 'implementation' }, cause: Error: Unexpected null value. - at throwNull (/some/path/to/prelude.ts:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at throwNull (/some/path/to/prelude.ts:XX:XX:29) + at Object.run (/some/path/to/core.ts:XX:XX:35) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at (/some/path/to/runHook.ts:XX:XX:14) + at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:18) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/_snippets/examples/extension/opentelemetry.detail.md b/website/content/_snippets/examples/extension/opentelemetry.detail.md index f10a97e99..b651cb1e9 100644 --- a/website/content/_snippets/examples/extension/opentelemetry.detail.md +++ b/website/content/_snippets/examples/extension/opentelemetry.detail.md @@ -38,14 +38,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'encode', - id: 'b73a6173a06457b8', + id: 'dcdd7c9ea7a24491', kind: 0, - timestamp: 1727285964122000, - duration: 586.208, + timestamp: 1727291930021000, + duration: 1392.459, attributes: {}, status: { code: 0 }, events: [], @@ -65,14 +65,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'pack', - id: '72e04ccbdff7501a', + id: 'd1ca1155f050f30c', kind: 0, - timestamp: 1727285964124000, - duration: 10593.375, + timestamp: 1727291930024000, + duration: 16745.417, attributes: {}, status: { code: 0 }, events: [], @@ -92,14 +92,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'exchange', - id: 'fa5128aec0e959ca', + id: 'c9978fd02d8f3228', kind: 0, - timestamp: 1727285964135000, - duration: 20171.708, + timestamp: 1727291930042000, + duration: 24516.084, attributes: {}, status: { code: 0 }, events: [], @@ -119,14 +119,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'unpack', - id: '09cd546669f80741', + id: '663a79043ef1feea', kind: 0, - timestamp: 1727285964155000, - duration: 1131.833, + timestamp: 1727291930067000, + duration: 1665.125, attributes: {}, status: { code: 0 }, events: [], @@ -146,14 +146,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'decode', - id: '7df87c3b794416da', + id: '9fd8d38e892a7a50', kind: 0, - timestamp: 1727285964157000, - duration: 182.958, + timestamp: 1727291930068000, + duration: 184.333, attributes: {}, status: { code: 0 }, events: [], @@ -173,14 +173,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', + traceId: '9d154073558dfe77a07840d133b4358c', parentId: undefined, traceState: undefined, name: 'request', - id: 'edf254d33dc1a8ab', + id: '57916921f30d3744', kind: 0, - timestamp: 1727285964121000, - duration: 36185.667, + timestamp: 1727291930020000, + duration: 48270.291, attributes: {}, status: { code: 0 }, events: [], @@ -195,8 +195,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/extension/opentelemetry.md b/website/content/_snippets/examples/extension/opentelemetry.md index 8bc5b9c15..547091033 100644 --- a/website/content/_snippets/examples/extension/opentelemetry.md +++ b/website/content/_snippets/examples/extension/opentelemetry.md @@ -36,14 +36,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'encode', - id: 'b73a6173a06457b8', + id: 'dcdd7c9ea7a24491', kind: 0, - timestamp: 1727285964122000, - duration: 586.208, + timestamp: 1727291930021000, + duration: 1392.459, attributes: {}, status: { code: 0 }, events: [], @@ -63,14 +63,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'pack', - id: '72e04ccbdff7501a', + id: 'd1ca1155f050f30c', kind: 0, - timestamp: 1727285964124000, - duration: 10593.375, + timestamp: 1727291930024000, + duration: 16745.417, attributes: {}, status: { code: 0 }, events: [], @@ -90,14 +90,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'exchange', - id: 'fa5128aec0e959ca', + id: 'c9978fd02d8f3228', kind: 0, - timestamp: 1727285964135000, - duration: 20171.708, + timestamp: 1727291930042000, + duration: 24516.084, attributes: {}, status: { code: 0 }, events: [], @@ -117,14 +117,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'unpack', - id: '09cd546669f80741', + id: '663a79043ef1feea', kind: 0, - timestamp: 1727285964155000, - duration: 1131.833, + timestamp: 1727291930067000, + duration: 1665.125, attributes: {}, status: { code: 0 }, events: [], @@ -144,14 +144,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'decode', - id: '7df87c3b794416da', + id: '9fd8d38e892a7a50', kind: 0, - timestamp: 1727285964157000, - duration: 182.958, + timestamp: 1727291930068000, + duration: 184.333, attributes: {}, status: { code: 0 }, events: [], @@ -171,14 +171,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', + traceId: '9d154073558dfe77a07840d133b4358c', parentId: undefined, traceState: undefined, name: 'request', - id: 'edf254d33dc1a8ab', + id: '57916921f30d3744', kind: 0, - timestamp: 1727285964121000, - duration: 36185.667, + timestamp: 1727291930020000, + duration: 48270.291, attributes: {}, status: { code: 0 }, events: [], @@ -193,8 +193,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/output/default.detail.md b/website/content/_snippets/examples/output/default.detail.md index 6868c90be..d1012f066 100644 --- a/website/content/_snippets/examples/output/default.detail.md +++ b/website/content/_snippets/examples/output/default.detail.md @@ -22,8 +22,7 @@ console.log(pokemons) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] ``` diff --git a/website/content/_snippets/examples/output/default.md b/website/content/_snippets/examples/output/default.md index 30c63dfbc..b04bb6ebd 100644 --- a/website/content/_snippets/examples/output/default.md +++ b/website/content/_snippets/examples/output/default.md @@ -20,8 +20,7 @@ console.log(pokemons) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] ``` diff --git a/website/content/_snippets/examples/output/envelope-error-throw.detail.md b/website/content/_snippets/examples/output/envelope-error-throw.detail.md index 7e724099f..ed4dfb55a 100644 --- a/website/content/_snippets/examples/output/envelope-error-throw.detail.md +++ b/website/content/_snippets/examples/output/envelope-error-throw.detail.md @@ -30,26 +30,26 @@ await pokemon.query.pokemons({ name: true }) ```txt -/some/path/to/runPipeline.ts:76 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { ^ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/_snippets/examples/output/envelope-error-throw.md b/website/content/_snippets/examples/output/envelope-error-throw.md index 9d256dc37..a0f1810ec 100644 --- a/website/content/_snippets/examples/output/envelope-error-throw.md +++ b/website/content/_snippets/examples/output/envelope-error-throw.md @@ -28,26 +28,26 @@ await pokemon.query.pokemons({ name: true }) ```txt -/some/path/to/runPipeline.ts:76 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { ^ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/_snippets/examples/output/envelope-error.detail.md b/website/content/_snippets/examples/output/envelope-error.detail.md index c9f4568cf..3c7189d16 100644 --- a/website/content/_snippets/examples/output/envelope-error.detail.md +++ b/website/content/_snippets/examples/output/envelope-error.detail.md @@ -36,20 +36,20 @@ console.log(result) { errors: [ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ] } diff --git a/website/content/_snippets/examples/output/envelope-error.md b/website/content/_snippets/examples/output/envelope-error.md index 27cace72b..f900176de 100644 --- a/website/content/_snippets/examples/output/envelope-error.md +++ b/website/content/_snippets/examples/output/envelope-error.md @@ -34,20 +34,20 @@ console.log(result) { errors: [ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ] } diff --git a/website/content/_snippets/examples/output/envelope.detail.md b/website/content/_snippets/examples/output/envelope.detail.md index 7e61fd738..2dd87e18b 100644 --- a/website/content/_snippets/examples/output/envelope.detail.md +++ b/website/content/_snippets/examples/output/envelope.detail.md @@ -28,8 +28,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] }, errors: undefined, @@ -39,8 +38,8 @@ console.log(result) statusText: 'OK', headers: Headers { 'content-type': 'application/graphql-response+json; charset=utf-8', - 'content-length': '120', - date: 'Wed, 25 Sep 2024 17:39:23 GMT', + 'content-length': '104', + date: 'Wed, 25 Sep 2024 19:18:49 GMT', connection: 'keep-alive', 'keep-alive': 'timeout=5' }, diff --git a/website/content/_snippets/examples/output/envelope.md b/website/content/_snippets/examples/output/envelope.md index 2f10c7fba..1ea1c91ce 100644 --- a/website/content/_snippets/examples/output/envelope.md +++ b/website/content/_snippets/examples/output/envelope.md @@ -26,8 +26,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] }, errors: undefined, @@ -37,8 +36,8 @@ console.log(result) statusText: 'OK', headers: Headers { 'content-type': 'application/graphql-response+json; charset=utf-8', - 'content-length': '120', - date: 'Wed, 25 Sep 2024 17:39:23 GMT', + 'content-length': '104', + date: 'Wed, 25 Sep 2024 19:18:49 GMT', connection: 'keep-alive', 'keep-alive': 'timeout=5' }, diff --git a/website/content/_snippets/examples/output/return-error-execution.detail.md b/website/content/_snippets/examples/output/return-error-execution.detail.md index 1f41920ab..4e4e417ab 100644 --- a/website/content/_snippets/examples/output/return-error-execution.detail.md +++ b/website/content/_snippets/examples/output/return-error-execution.detail.md @@ -46,12 +46,12 @@ try { ```txt ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:16) { context: {}, cause: undefined, errors: [ @@ -68,12 +68,12 @@ ContextualAggregateError: One or more errors in the execution result. ] } ] - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: [ 'addPokemon' ], locations: undefined, extensions: [Object: null prototype] {} @@ -85,21 +85,21 @@ ContextualAggregateError: One or more errors in the execution result. ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:3) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:13) + at applyBody (/some/path/to/main.ts:XX:XX:28) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) } ``` diff --git a/website/content/_snippets/examples/output/return-error-execution.md b/website/content/_snippets/examples/output/return-error-execution.md index 806a63eeb..f4c8e7f24 100644 --- a/website/content/_snippets/examples/output/return-error-execution.md +++ b/website/content/_snippets/examples/output/return-error-execution.md @@ -44,12 +44,12 @@ try { ```txt ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:16) { context: {}, cause: undefined, errors: [ @@ -66,12 +66,12 @@ ContextualAggregateError: One or more errors in the execution result. ] } ] - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: [ 'addPokemon' ], locations: undefined, extensions: [Object: null prototype] {} @@ -83,21 +83,21 @@ ContextualAggregateError: One or more errors in the execution result. ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:3) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:13) + at applyBody (/some/path/to/main.ts:XX:XX:28) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) } ``` diff --git a/website/content/_snippets/examples/output/return-error.detail.md b/website/content/_snippets/examples/output/return-error.detail.md index b885a51bd..0977958a2 100644 --- a/website/content/_snippets/examples/output/return-error.detail.md +++ b/website/content/_snippets/examples/output/return-error.detail.md @@ -33,20 +33,20 @@ console.log(pokemons) ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error.ts:XX:XX:18) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ``` diff --git a/website/content/_snippets/examples/output/return-error.md b/website/content/_snippets/examples/output/return-error.md index 8fb6fdfac..1129d70ae 100644 --- a/website/content/_snippets/examples/output/return-error.md +++ b/website/content/_snippets/examples/output/return-error.md @@ -31,20 +31,20 @@ console.log(pokemons) ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error.ts:XX:XX:18) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ``` diff --git a/website/content/_snippets/examples/output/standard-graphql.detail.md b/website/content/_snippets/examples/output/standard-graphql.detail.md index e8b53d43d..095e3357c 100644 --- a/website/content/_snippets/examples/output/standard-graphql.detail.md +++ b/website/content/_snippets/examples/output/standard-graphql.detail.md @@ -20,37 +20,37 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "exchange". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) ... 3 lines matching cause stack trace ... - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX) { + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX:16) { context: { hookName: 'exchange', source: 'implementation' }, [cause]: TypeError: Failed to parse URL from ... at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) + at Object.run (/some/path/to/core.ts:XX:XX:29) ... 6 lines matching cause stack trace ... - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) { [cause]: TypeError: Invalid URL at new URL (node:internal/url:XX:XX) at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) { + at Object.run (/some/path/to/core.ts:XX:XX:29) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:8) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:20) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) { code: 'ERR_INVALID_URL', input: '...' } diff --git a/website/content/_snippets/examples/output/standard-graphql.md b/website/content/_snippets/examples/output/standard-graphql.md index 2abaa4dce..c8c7a359e 100644 --- a/website/content/_snippets/examples/output/standard-graphql.md +++ b/website/content/_snippets/examples/output/standard-graphql.md @@ -18,37 +18,37 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "exchange". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) ... 3 lines matching cause stack trace ... - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX) { + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX:16) { context: { hookName: 'exchange', source: 'implementation' }, [cause]: TypeError: Failed to parse URL from ... at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) + at Object.run (/some/path/to/core.ts:XX:XX:29) ... 6 lines matching cause stack trace ... - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) { [cause]: TypeError: Invalid URL at new URL (node:internal/url:XX:XX) at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) { + at Object.run (/some/path/to/core.ts:XX:XX:29) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:8) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:20) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) { code: 'ERR_INVALID_URL', input: '...' } diff --git a/website/content/_snippets/examples/raw/raw-document-node.detail.md b/website/content/_snippets/examples/raw/raw-document-node.detail.md index 6b7ccc6c0..fab5e3021 100644 --- a/website/content/_snippets/examples/raw/raw-document-node.detail.md +++ b/website/content/_snippets/examples/raw/raw-document-node.detail.md @@ -34,28 +34,28 @@ console.log(data) ```txt -/some/path/to/handleOutput.ts:60 +/some/path/to/handleOutput.ts:XX:XX const error = new Errors.ContextualAggregateError( ^ ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Proxy.raw (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Proxy.raw (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX:14) { context: {}, cause: undefined, errors: [ GraphQLError: Cannot query field "continent" on type "Pokemon". - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: undefined, locations: undefined, extensions: [Object: null prototype] {} diff --git a/website/content/_snippets/examples/raw/raw-document-node.md b/website/content/_snippets/examples/raw/raw-document-node.md index 12c840a2b..25dd12dca 100644 --- a/website/content/_snippets/examples/raw/raw-document-node.md +++ b/website/content/_snippets/examples/raw/raw-document-node.md @@ -32,28 +32,28 @@ console.log(data) ```txt -/some/path/to/handleOutput.ts:60 +/some/path/to/handleOutput.ts:XX:XX const error = new Errors.ContextualAggregateError( ^ ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Proxy.raw (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Proxy.raw (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX:14) { context: {}, cause: undefined, errors: [ GraphQLError: Cannot query field "continent" on type "Pokemon". - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: undefined, locations: undefined, extensions: [Object: null prototype] {} diff --git a/website/content/_snippets/examples/raw/raw-string.detail.md b/website/content/_snippets/examples/raw/raw-string.detail.md index 1a3e95677..e0c2d261e 100644 --- a/website/content/_snippets/examples/raw/raw-string.detail.md +++ b/website/content/_snippets/examples/raw/raw-string.detail.md @@ -32,8 +32,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/raw/raw-string.md b/website/content/_snippets/examples/raw/raw-string.md index f22fc0bdd..7c3435fd2 100644 --- a/website/content/_snippets/examples/raw/raw-string.md +++ b/website/content/_snippets/examples/raw/raw-string.md @@ -30,8 +30,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/_snippets/examples/transport-http/dynamic-headers.detail.md b/website/content/_snippets/examples/transport-http/dynamic-headers.detail.md index b6afd320d..138052ab9 100644 --- a/website/content/_snippets/examples/transport-http/dynamic-headers.detail.md +++ b/website/content/_snippets/examples/transport-http/dynamic-headers.detail.md @@ -38,7 +38,7 @@ await graffle.rawString({ document: `{ pokemons { name } }` }) headers: Headers { accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8', 'content-type': 'application/json', - 'x-sent-at-time': '1727285962935' + 'x-sent-at-time': '1727291929241' }, signal: undefined, method: 'post', diff --git a/website/content/_snippets/examples/transport-http/dynamic-headers.md b/website/content/_snippets/examples/transport-http/dynamic-headers.md index a996ff29e..13317fa59 100644 --- a/website/content/_snippets/examples/transport-http/dynamic-headers.md +++ b/website/content/_snippets/examples/transport-http/dynamic-headers.md @@ -36,7 +36,7 @@ await graffle.rawString({ document: `{ pokemons { name } }` }) headers: Headers { accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8', 'content-type': 'application/json', - 'x-sent-at-time': '1727285962935' + 'x-sent-at-time': '1727291929241' }, signal: undefined, method: 'post', diff --git a/website/content/examples/10_transport-http/dynamic-headers.md b/website/content/examples/10_transport-http/dynamic-headers.md index 041f82ed0..1e9eb0d96 100644 --- a/website/content/examples/10_transport-http/dynamic-headers.md +++ b/website/content/examples/10_transport-http/dynamic-headers.md @@ -43,7 +43,7 @@ await graffle.rawString({ document: `{ pokemons { name } }` }) headers: Headers { accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8', 'content-type': 'application/json', - 'x-sent-at-time': '1727285962935' + 'x-sent-at-time': '1727291929241' }, signal: undefined, method: 'post', diff --git a/website/content/examples/20_output/default.md b/website/content/examples/20_output/default.md index 0acf94527..3c8173e84 100644 --- a/website/content/examples/20_output/default.md +++ b/website/content/examples/20_output/default.md @@ -27,8 +27,7 @@ console.log(pokemons) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] ``` diff --git a/website/content/examples/20_output/envelope-error-throw.md b/website/content/examples/20_output/envelope-error-throw.md index 0ca123c4f..2134a17c2 100644 --- a/website/content/examples/20_output/envelope-error-throw.md +++ b/website/content/examples/20_output/envelope-error-throw.md @@ -35,26 +35,26 @@ await pokemon.query.pokemons({ name: true }) ```txt -/some/path/to/runPipeline.ts:76 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { ^ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/examples/20_output/envelope-error.md b/website/content/examples/20_output/envelope-error.md index 8e1407d84..a9dc5a57b 100644 --- a/website/content/examples/20_output/envelope-error.md +++ b/website/content/examples/20_output/envelope-error.md @@ -41,20 +41,20 @@ console.log(result) { errors: [ ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ] } diff --git a/website/content/examples/20_output/envelope.md b/website/content/examples/20_output/envelope.md index 76d1af3c1..d330664cb 100644 --- a/website/content/examples/20_output/envelope.md +++ b/website/content/examples/20_output/envelope.md @@ -33,8 +33,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] }, errors: undefined, @@ -44,8 +43,8 @@ console.log(result) statusText: 'OK', headers: Headers { 'content-type': 'application/graphql-response+json; charset=utf-8', - 'content-length': '120', - date: 'Wed, 25 Sep 2024 17:39:23 GMT', + 'content-length': '104', + date: 'Wed, 25 Sep 2024 19:18:49 GMT', connection: 'keep-alive', 'keep-alive': 'timeout=5' }, diff --git a/website/content/examples/20_output/return-error-execution.md b/website/content/examples/20_output/return-error-execution.md index a6ae59f55..e44b2e16a 100644 --- a/website/content/examples/20_output/return-error-execution.md +++ b/website/content/examples/20_output/return-error-execution.md @@ -51,12 +51,12 @@ try { ```txt ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:16) { context: {}, cause: undefined, errors: [ @@ -73,12 +73,12 @@ ContextualAggregateError: One or more errors in the execution result. ] } ] - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: [ 'addPokemon' ], locations: undefined, extensions: [Object: null prototype] {} @@ -90,21 +90,21 @@ ContextualAggregateError: One or more errors in the execution result. ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) { + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:3) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error_return-error-execution__return-error-execution.ts:XX:XX:13) + at applyBody (/some/path/to/main.ts:XX:XX:28) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) } ``` diff --git a/website/content/examples/20_output/return-error.md b/website/content/examples/20_output/return-error.md index 68607b907..dcff50336 100644 --- a/website/content/examples/20_output/return-error.md +++ b/website/content/examples/20_output/return-error.md @@ -38,20 +38,20 @@ console.log(pokemons) ```txt ContextualError: There was an error in the extension "anonymous" (use named functions to improve this error message) while running hook "encode". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async executeRootType (/some/path/to/client.ts:XX:XX) - at async executeRootTypeField (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_return-error.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async executeRootType (/some/path/to/client.ts:XX:XX:12) + at async executeRootTypeField (/some/path/to/client.ts:XX:XX:20) + at async (/some/path/to/output_return-error.ts:XX:XX:18) { context: { hookName: 'encode', source: 'extension', extensionName: 'anonymous' }, cause: Error: Something went wrong. - at (/some/path/to/output_return-error.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at (/some/path/to/output_return-error.ts:XX:XX:11) + at applyBody (/some/path/to/main.ts:XX:XX:28) } ``` diff --git a/website/content/examples/20_output/standard-graphql.md b/website/content/examples/20_output/standard-graphql.md index d821f338f..78fac7305 100644 --- a/website/content/examples/20_output/standard-graphql.md +++ b/website/content/examples/20_output/standard-graphql.md @@ -25,37 +25,37 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "exchange". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) ... 3 lines matching cause stack trace ... - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX) { + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/output_preset__standard-graphql.ts:XX:XX:16) { context: { hookName: 'exchange', source: 'implementation' }, [cause]: TypeError: Failed to parse URL from ... at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) + at Object.run (/some/path/to/core.ts:XX:XX:29) ... 6 lines matching cause stack trace ... - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) { [cause]: TypeError: Invalid URL at new URL (node:internal/url:XX:XX) at new Request (node:internal/deps/undici/undici:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) { + at Object.run (/some/path/to/core.ts:XX:XX:29) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:8) + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:20) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) { code: 'ERR_INVALID_URL', input: '...' } diff --git a/website/content/examples/30_raw/raw-document-node.md b/website/content/examples/30_raw/raw-document-node.md index 5fb18c0ec..28714828f 100644 --- a/website/content/examples/30_raw/raw-document-node.md +++ b/website/content/examples/30_raw/raw-document-node.md @@ -39,28 +39,28 @@ console.log(data) ```txt -/some/path/to/handleOutput.ts:60 +/some/path/to/handleOutput.ts:XX:XX const error = new Errors.ContextualAggregateError( ^ ContextualAggregateError: One or more errors in the execution result. - at handleOutput (/some/path/to/handleOutput.ts:XX:XX) - at run (/some/path/to/client.ts:XX:XX) + at handleOutput (/some/path/to/handleOutput.ts:XX:XX:19) + at run (/some/path/to/client.ts:XX:XX:12) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Proxy.raw (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX) { + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Proxy.raw (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/raw_rawDocumentNode__raw-document-node.ts:XX:XX:14) { context: {}, cause: undefined, errors: [ GraphQLError: Cannot query field "continent" on type "Pokemon". - at (/some/path/to/graphqlHTTP.ts:XX:XX) + at (/some/path/to/graphqlHTTP.ts:XX:XX:47) at Array.map () - at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX) - at Object.unpack (/some/path/to/core.ts:XX:XX) + at parseExecutionResult (/some/path/to/graphqlHTTP.ts:XX:XX:28) + at Object.unpack (/some/path/to/core.ts:XX:XX:26) at process.processTicksAndRejections (node:internal/process/task_queues:XX:XX) - at async runHook (/some/path/to/runHook.ts:XX:XX) { + at async runHook (/some/path/to/runHook.ts:XX:XX:16) { path: undefined, locations: undefined, extensions: [Object: null prototype] {} diff --git a/website/content/examples/30_raw/raw-string.md b/website/content/examples/30_raw/raw-string.md index 0ef66eab2..f2696569f 100644 --- a/website/content/examples/30_raw/raw-string.md +++ b/website/content/examples/30_raw/raw-string.md @@ -37,8 +37,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/examples/50_anyware/slot-body.md b/website/content/examples/50_anyware/slot-body.md index 989e821c0..d319e60e6 100644 --- a/website/content/examples/50_anyware/slot-body.md +++ b/website/content/examples/50_anyware/slot-body.md @@ -50,8 +50,7 @@ console.log(result) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ``` diff --git a/website/content/examples/50_anyware/slot-search-params.md b/website/content/examples/50_anyware/slot-search-params.md index 8cdcc8ebc..e78a4b039 100644 --- a/website/content/examples/50_anyware/slot-search-params.md +++ b/website/content/examples/50_anyware/slot-search-params.md @@ -45,28 +45,28 @@ console.log(result) ```txt -/some/path/to/runPipeline.ts:84 +/some/path/to/runPipeline.ts:XX:XX return new ContextualError(message, { hookName: signal.hookName, source: signal.source }, signal.error) ^ ContextualError: There was an error in the core implementation of hook "pack". - at runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async runPipeline (/some/path/to/runPipeline.ts:XX:XX) - at async Object.run (/some/path/to/main.ts:XX:XX) - at async run (/some/path/to/client.ts:XX:XX) - at async runRaw (/some/path/to/client.ts:XX:XX) - at async Object.raw (/some/path/to/client.ts:XX:XX) - at async Proxy.rawString (/some/path/to/client.ts:XX:XX) - at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) { + at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18) + at async runPipeline (/some/path/to/runPipeline.ts:XX:XX:14) + at async Object.run (/some/path/to/main.ts:XX:XX:22) + at async run (/some/path/to/client.ts:XX:XX:20) + at async runRaw (/some/path/to/client.ts:XX:XX:12) + at async Object.raw (/some/path/to/client.ts:XX:XX:14) + at async Proxy.rawString (/some/path/to/client.ts:XX:XX:14) + at async (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:16) { context: { hookName: 'pack', source: 'implementation' }, cause: Error: Unexpected null value. - at throwNull (/some/path/to/prelude.ts:XX:XX) - at Object.run (/some/path/to/core.ts:XX:XX) - at runHook (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/runHook.ts:XX:XX) - at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX) - at applyBody (/some/path/to/main.ts:XX:XX) + at throwNull (/some/path/to/prelude.ts:XX:XX:29) + at Object.run (/some/path/to/core.ts:XX:XX:35) + at runHook (/some/path/to/runHook.ts:XX:XX:37) + at (/some/path/to/runHook.ts:XX:XX:14) + at (/some/path/to/anyware_slot_slot-body__slot-search-params.ts:XX:XX:18) + at applyBody (/some/path/to/main.ts:XX:XX:28) } Node.js vXX.XX.XX diff --git a/website/content/examples/60_extension/opentelemetry.md b/website/content/examples/60_extension/opentelemetry.md index 66353d4cb..b18c047ef 100644 --- a/website/content/examples/60_extension/opentelemetry.md +++ b/website/content/examples/60_extension/opentelemetry.md @@ -41,14 +41,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'encode', - id: 'b73a6173a06457b8', + id: 'dcdd7c9ea7a24491', kind: 0, - timestamp: 1727285964122000, - duration: 586.208, + timestamp: 1727291930021000, + duration: 1392.459, attributes: {}, status: { code: 0 }, events: [], @@ -68,14 +68,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'pack', - id: '72e04ccbdff7501a', + id: 'd1ca1155f050f30c', kind: 0, - timestamp: 1727285964124000, - duration: 10593.375, + timestamp: 1727291930024000, + duration: 16745.417, attributes: {}, status: { code: 0 }, events: [], @@ -95,14 +95,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'exchange', - id: 'fa5128aec0e959ca', + id: 'c9978fd02d8f3228', kind: 0, - timestamp: 1727285964135000, - duration: 20171.708, + timestamp: 1727291930042000, + duration: 24516.084, attributes: {}, status: { code: 0 }, events: [], @@ -122,14 +122,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'unpack', - id: '09cd546669f80741', + id: '663a79043ef1feea', kind: 0, - timestamp: 1727285964155000, - duration: 1131.833, + timestamp: 1727291930067000, + duration: 1665.125, attributes: {}, status: { code: 0 }, events: [], @@ -149,14 +149,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', - parentId: 'edf254d33dc1a8ab', + traceId: '9d154073558dfe77a07840d133b4358c', + parentId: '57916921f30d3744', traceState: undefined, name: 'decode', - id: '7df87c3b794416da', + id: '9fd8d38e892a7a50', kind: 0, - timestamp: 1727285964157000, - duration: 182.958, + timestamp: 1727291930068000, + duration: 184.333, attributes: {}, status: { code: 0 }, events: [], @@ -176,14 +176,14 @@ console.log(data) } }, instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined }, - traceId: '56acb90dcf960749c581c6b9cb4a5982', + traceId: '9d154073558dfe77a07840d133b4358c', parentId: undefined, traceState: undefined, name: 'request', - id: 'edf254d33dc1a8ab', + id: '57916921f30d3744', kind: 0, - timestamp: 1727285964121000, - duration: 36185.667, + timestamp: 1727291930020000, + duration: 48270.291, attributes: {}, status: { code: 0 }, events: [], @@ -198,8 +198,7 @@ console.log(data) { name: 'Pikachu' }, { name: 'Charizard' }, { name: 'Squirtle' }, - { name: 'Bulbasaur' }, - { name: 'Nano' } + { name: 'Bulbasaur' } ] } ```