feat(extension-system): transport now extensible #1741
Annotations
11 errors
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_abort.test.ts#L16
Error: Snapshot `transport-http_abort 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- This operation was aborted
+ /some/path/to/requestMethods.ts:XX:XX
+ export const requestMethodsProperties = createProperties((_, context) => {
+ ^
+
+
+ ReferenceError: Cannot access 'createProperties' before initialization
+ at <anonymous> (/some/path/to/requestMethods.ts:XX:XX:41)
+ at ModuleJob.run (node:internal/modules/esm/module_job:XX:XX)
+ at async ModuleLoader.import (node:internal/modules/esm/loader:XX:XX)
+ at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:XX:XX)
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_abort.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_extension_fetch__custom-fetch.test.ts#L16
Error: Snapshot `transport-http_extension_fetch__custom-fetch 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- "pokemon": [
- {
- "name": "Pokemon Mocked!"
- }
- ]
- }
+ /some/path/to/requestMethods.ts:XX:XX
+ export const requestMethodsProperties = createProperties((_, context) => {
+ ^
+
+
+ ReferenceError: Cannot access 'createProperties' before initialization
+ at <anonymous> (/some/path/to/requestMethods.ts:XX:XX:41)
+ at ModuleJob.run (node:internal/modules/esm/module_job:XX:XX)
+ at async ModuleLoader.import (node:internal/modules/esm/loader:XX:XX)
+ at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:XX:XX)
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_extension_fetch__custom-fetch.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_extension_headers__dynamicHeaders.test.ts#L19
Error: Snapshot `transport-http_extension_headers__dynamicHeaders 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- methodMode: 'post',
- headers: Headers {
- accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
- 'content-type': 'application/json',
- 'x-sent-at-time': 'DYNAMIC_VALUE'
- },
- method: 'post',
- url: 'http://localhost:3000/graphql',
- body: '{"query":"{ pokemons { name } }"}'
- }
+ /some/path/to/requestMethods.ts:XX:XX
+ export const requestMethodsProperties = createProperties((_, context) => {
+ ^
+
+
+ ReferenceError: Cannot access 'createProperties' before initialization
+ at <anonymous> (/some/path/to/requestMethods.ts:XX:XX:41)
+ at ModuleJob.run (node:internal/modules/esm/module_job:XX:XX)
+ at async ModuleLoader.import (node:internal/modules/esm/loader:XX:XX)
+ at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:XX:XX)
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_extension_headers__dynamicHeaders.test.ts:19:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_headers_raw__headers.test.ts#L16
Error: Snapshot `transport-http_headers_raw__headers 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- Headers {
- accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
- 'content-type': 'application/json',
- authorization: '***',
- 'x-from-raw': 'true'
- }
+ /some/path/to/requestMethods.ts:XX:XX
+ export const requestMethodsProperties = createProperties((_, context) => {
+ ^
+
+
+ ReferenceError: Cannot access 'createProperties' before initialization
+ at <anonymous> (/some/path/to/requestMethods.ts:XX:XX:41)
+ at ModuleJob.run (node:internal/modules/esm/module_job:XX:XX)
+ at async ModuleLoader.import (node:internal/modules/esm/loader:XX:XX)
+ at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:XX:XX)
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_headers_raw__headers.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_method-get.test.ts#L16
Error: Snapshot `transport-http_method-get 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- methodMode: 'getReads',
- headers: Headers {
- accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
- 'content-type': 'application/json',
- tenant: 'nano'
- },
- method: 'post',
- url: URL {
- href: 'http://localhost:3000/graphql',
- origin: 'http://localhost:3000',
- protocol: 'http:',
- username: '',
- password: '',
- host: 'localhost:3000',
- hostname: 'localhost',
- port: '3000',
- pathname: '/graphql',
- search: '',
- searchParams: URLSearchParams {},
- hash: ''
- },
- body: '{"query":"mutation {\\n addPokemon(attack: 0, defense: 0, hp: 1, name: \\"Nano\\", type: grass) {\\n name\\n }\\n}"}'
- }
- ---------------------------------------- SHOW ----------------------------------------
- {
- methodMode: 'getReads',
- headers: Headers {
- accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
- tenant: 'nano'
- },
- method: 'get',
- url: URL {
- href: 'http://localhost:3000/graphql?query=%7B%0A++pokemonByName%28name%3A+%22Nano%22%29+%7B%0A++++hp%0A++%7D%0A%7D',
- origin: 'http://localhost:3000',
- protocol: 'http:',
- username: '',
- password: '',
- host: 'localhost:3000',
- hostname: 'localhost',
- port: '3000',
+ node:internal/modules/run_main:128
+ triggerUncaughtException(
+ ^
+ Error: Cannot find package '/some/path/to/utilities-for-generated.ts:XX:XX
+ at legacyMainResolve (node:internal/modules/esm/resolve:XX:XX)
+ at packageResolve (node:internal/modules/esm/resolve:XX:XX)
+ at moduleResolve (node:internal/modules/esm/resolve:XX:XX)
+ at defaultResolve (node:internal/modules/esm/resolve:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX)
+ at resolveBase (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917767800:XX:XX)
+ at resolveDirectory (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917767800:XX:XX)
+ at resolveTsPaths (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917767800:XX:XX)
- pathname: '/graphql',
- search: '?query=%7B%0A++pokemonByName%28name%3A+%22Nano%22%29+%7B%0A++++hp%0A++%7D%0A%7D',
- searchParams: URLSearchParams { 'query' => '{\n pokemonByName(name: "Nano") {\n hp\n }\n}' },
- hash: ''
- }
- }
+ at resolve (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917767800:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX) {
+ code: 'ERR_MODULE_NOT_FOUND'
+ }
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_method-get.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/10_transport-http/transport-http_raw.test.ts#L16
Error: Snapshot `transport-http_raw 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- methodMode: 'post',
- headers: Headers {
- accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
- 'content-type': 'application/json'
- },
- mode: 'cors',
- method: 'post',
- url: 'http://localhost:3000/graphql',
- body: '{"query":"{ pokemons { name } }"}'
- }
+ /some/path/to/requestMethods.ts:XX:XX
+ export const requestMethodsProperties = createProperties((_, context) => {
+ ^
+
+
+ ReferenceError: Cannot access 'createProperties' before initialization
+ at <anonymous> (/some/path/to/requestMethods.ts:XX:XX:41)
+ at ModuleJob.run (node:internal/modules/esm/module_job:XX:XX)
+ at async ModuleLoader.import (node:internal/modules/esm/loader:XX:XX)
+ at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:XX:XX)
+
+ Node.js vXX.XX.XX
❯ tests/examples/10_transport-http/transport-http_raw.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/20_output/output_default.test.ts#L16
Error: Snapshot `output_default 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- [
- { name: 'Pikachu' },
- { name: 'Charizard' },
- { name: 'Squirtle' },
- { name: 'Bulbasaur' },
- { name: 'Caterpie' },
- { name: 'Weedle' }
- ]
+ node:internal/modules/run_main:128
+ triggerUncaughtException(
+ ^
+ Error: Cannot find package '/some/path/to/utilities-for-generated.ts:XX:XX
+ at legacyMainResolve (node:internal/modules/esm/resolve:XX:XX)
+ at packageResolve (node:internal/modules/esm/resolve:XX:XX)
+ at moduleResolve (node:internal/modules/esm/resolve:XX:XX)
+ at defaultResolve (node:internal/modules/esm/resolve:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX)
+ at resolveBase (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917776099:XX:XX)
+ at resolveDirectory (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917776099:XX:XX)
+ at resolveTsPaths (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917776099:XX:XX)
+ at resolve (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917776099:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX) {
+ code: 'ERR_MODULE_NOT_FOUND'
+ }
+
+ Node.js vXX.XX.XX
❯ tests/examples/20_output/output_default.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/20_output/output_envelope.test.ts#L17
Error: Snapshot `output_envelope 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- data: {
- pokemons: [
- { name: 'Pikachu' },
- { name: 'Charizard' },
- { name: 'Squirtle' },
- { name: 'Bulbasaur' },
- { name: 'Caterpie' },
- { name: 'Weedle' }
- ]
- },
- response: Response {
- status: 200,
- statusText: 'OK',
- headers: DYNAMIC_VALUE,
- body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
- bodyUsed: true,
- ok: true,
- redirected: false,
- type: 'basic',
- url: 'http://localhost:3000/graphql'
- }
+ node:internal/modules/run_main:128
+ triggerUncaughtException(
+ ^
+ Error: Cannot find package '/some/path/to/utilities-for-generated.ts:XX:XX
+ at legacyMainResolve (node:internal/modules/esm/resolve:XX:XX)
+ at packageResolve (node:internal/modules/esm/resolve:XX:XX)
+ at moduleResolve (node:internal/modules/esm/resolve:XX:XX)
+ at defaultResolve (node:internal/modules/esm/resolve:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX)
+ at resolveBase (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755924:XX:XX)
+ at resolveDirectory (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755924:XX:XX)
+ at resolveTsPaths (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755924:XX:XX)
+ at resolve (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755924:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX) {
+ code: 'ERR_MODULE_NOT_FOUND'
}
+
+ Node.js vXX.XX.XX
❯ tests/examples/20_output/output_envelope.test.ts:17:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/20_output/output_envelope_envelope-error__envelope-error.test.ts#L16
Error: Snapshot `output_envelope_envelope-error__envelope-error 1` mismatched
- Expected
+ Received
- ---------------------------------------- SHOW ----------------------------------------
- {
- errors: [
- ContextualError: There was an error in the interceptor "anonymous" (use named functions to improve this error message) while running hook "encode".
- at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18)
- at async <anonymous> (/some/path/to/runner.ts:XX:XX:20)
- at async Module.run (/some/path/to/run.ts:XX:XX:10)
+ node:internal/modules/run_main:128
+ triggerUncaughtException(
+ ^
+ Error: Cannot find package '/some/path/to/utilities-for-generated.ts:XX:XX
+ at legacyMainResolve (node:internal/modules/esm/resolve:XX:XX)
+ at packageResolve (node:internal/modules/esm/resolve:XX:XX)
+ at moduleResolve (node:internal/modules/esm/resolve:XX:XX)
- at async executeDocument (/some/path/to/requestMethods.ts:XX:XX:18)
- at async executeRootField (/some/path/to/requestMethods.ts:XX:XX:18)
- at async <anonymous> (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:16) {
- context: {
- hookName: 'encode',
- source: 'extension',
- interceptorName: 'anonymous'
- },
- cause: Error: Something went wrong.
- at <anonymous> (/some/path/to/output_envelope_envelope-error__envelope-error.ts:XX:XX:11)
+ at defaultResolve (node:internal/modules/esm/resolve:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX)
+ at resolveBase (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917757493:XX:XX)
+ at resolveDirectory (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917757493:XX:XX)
+ at resolveTsPaths (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917757493:XX:XX)
+ at resolve (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917757493:XX:XX)
- at applyBody (/some/path/to/runner.ts:XX:XX:28)
- }
- ]
- }
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX) {
+ code: 'ERR_MODULE_NOT_FOUND'
+ }
+
+ Node.js vXX.XX.XX
❯ tests/examples/20_output/output_envelope_envelope-error__envelope-error.test.ts:16:3
|
Run pnpm test:examples -- --environment jsdom:
tests/examples/20_output/output_envelope_envelope_error-throw__envelope-error-throw.test.ts#L18
Error: Snapshot `output_envelope_envelope_error-throw__envelope-error-throw 1` mismatched
- Expected
+ Received
- /some/path/to/runPipeline.ts:XX:XX
- return new ContextualError(message, {
- ^
-
-
- ContextualError: There was an error in the interceptor "anonymous" (use named functions to improve this error message) while running hook "encode".
- at runPipeline (/some/path/to/runPipeline.ts:XX:XX:18)
+ node:internal/modules/run_main:128
+ triggerUncaughtException(
+ ^
+ Error: Cannot find package '/some/path/to/utilities-for-generated.ts:XX:XX
+ at legacyMainResolve (node:internal/modules/esm/resolve:XX:XX)
+ at packageResolve (node:internal/modules/esm/resolve:XX:XX)
- at async <anonymous> (/some/path/to/runner.ts:XX:XX:20)
+ at moduleResolve (node:internal/modules/esm/resolve:XX:XX)
- at async Module.run (/some/path/to/run.ts:XX:XX:10)
+ at defaultResolve (node:internal/modules/esm/resolve:XX:XX)
- at async executeDocument (/some/path/to/requestMethods.ts:XX:XX:18)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX)
- at async executeRootField (/some/path/to/requestMethods.ts:XX:XX:18)
+ at resolveBase (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755730:XX:XX)
- at async <anonymous> (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:1) {
- context: {
- hookName: 'encode',
- source: 'extension',
- interceptorName: 'anonymous'
- },
- cause: Error: Something went wrong.
- at <anonymous> (/some/path/to/output_envelope_envelope_error-throw__envelope-error-throw.ts:XX:XX:11)
- at applyBody (/some/path/to/runner.ts:XX:XX:28)
+ at resolveDirectory (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755730:XX:XX)
+ at resolveTsPaths (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755730:XX:XX)
+ at resolve (file:///home/runner/work/graffle/graffle/node_modules/.pnpm/tsx@4.19.2/node_modules/tsx/dist/esm/index.mjs?1732917755730:XX:XX)
+ at nextResolve (node:internal/modules/esm/hooks:XX:XX) {
+ code: 'ERR_MODULE_NOT_FOUND'
}
Node.js vXX.XX.XX
❯ tests/examples/20_output/output_envelope_envelope_error-throw__envelope-error-throw.test.ts:18:3
|
Loading