Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename examples group #1209

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import tsEslint from 'typescript-eslint'

export default tsEslint.config({
ignores: [
'examples/55_generated/generated_document__document.ts',
'examples/55_document-buildergenerated_document__document.ts',
'eslint.config.js',
'vite.config.ts',
'vitest*.config.ts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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': '1728912147789'
'x-sent-at-time': '1729649902337'
},
signal: undefined,
method: 'post',
Expand Down
2 changes: 1 addition & 1 deletion examples/__outputs__/20_output/output_envelope.output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
headers: Headers {
'content-type': 'application/graphql-response+json; charset=utf-8',
'content-length': '142',
date: 'Mon, 14 Oct 2024 13:22:28 GMT',
date: 'Wed, 23 Oct 2024 02:18:22 GMT',
connection: 'keep-alive',
'keep-alive': 'timeout=5'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
parentId: 'e85b98029274120c',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: 'f68c78e8a4e9ae99',
traceState: undefined,
name: 'encode',
id: 'c50625041c2a6ed5',
id: 'c8b432c64c6d23ce',
kind: 0,
timestamp: 1728912148775000,
duration: 1505.542,
timestamp: 1729649903315000,
duration: 1492.792,
attributes: {},
status: { code: 0 },
events: [],
Expand All @@ -33,14 +33,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
parentId: 'e85b98029274120c',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: 'f68c78e8a4e9ae99',
traceState: undefined,
name: 'pack',
id: '11f13791202ae25b',
id: '385c61790e55b6f4',
kind: 0,
timestamp: 1728912148779000,
duration: 12466.834,
timestamp: 1729649903318000,
duration: 12042.5,
attributes: {},
status: { code: 0 },
events: [],
Expand All @@ -57,14 +57,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
parentId: 'e85b98029274120c',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: 'f68c78e8a4e9ae99',
traceState: undefined,
name: 'exchange',
id: 'e6cfb7ae84ff6884',
id: '67a764a3a78c819c',
kind: 0,
timestamp: 1728912148792000,
duration: 21899.333,
timestamp: 1729649903331000,
duration: 21272.625,
attributes: {},
status: { code: 0 },
events: [],
Expand All @@ -81,14 +81,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
parentId: 'e85b98029274120c',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: 'f68c78e8a4e9ae99',
traceState: undefined,
name: 'unpack',
id: 'd4efa36db6b171cd',
id: 'a92c1ad25a186aa9',
kind: 0,
timestamp: 1728912148814000,
duration: 1314.958,
timestamp: 1729649903352000,
duration: 1640.25,
attributes: {},
status: { code: 0 },
events: [],
Expand All @@ -105,14 +105,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
parentId: 'e85b98029274120c',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: 'f68c78e8a4e9ae99',
traceState: undefined,
name: 'decode',
id: '58283a74b8b0c8ac',
id: 'fbdf501193493665',
kind: 0,
timestamp: 1728912148816000,
duration: 245.125,
timestamp: 1729649903354000,
duration: 314.583,
attributes: {},
status: { code: 0 },
events: [],
Expand All @@ -129,14 +129,14 @@
}
},
instrumentationScope: { name: 'graffle', version: undefined, schemaUrl: undefined },
traceId: '27049eba5a2aefdef485bb13b3c9103a',
traceId: '2259f0e0e3b890cac862a813639e9c90',
parentId: undefined,
traceState: undefined,
name: 'request',
id: 'e85b98029274120c',
id: 'f68c78e8a4e9ae99',
kind: 0,
timestamp: 1728912148775000,
duration: 41363.958,
timestamp: 1729649903314000,
duration: 40837.167,
attributes: {},
status: { code: 0 },
events: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`generated_alias`, async () => {
const exampleResult = await runExample(`./examples/55_generated/generated_alias.ts`)
test(`document-builder_alias`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_alias.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_generated/generated_alias.output.txt`,
`../../../examples/__outputs__/55_document-builder/document-builder_alias.output.txt`,
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @vitest-environment node

// WARNING:
// This test is generated by scripts/generate-example-derivatives/generate.ts
// Do not modify this file directly.

import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`document-builder_arguments`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_arguments.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_document-builder/document-builder_arguments.output.txt`,
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`generated_arguments`, async () => {
const exampleResult = await runExample(`./examples/55_generated/generated_arguments.ts`)
test(`document-builder_batch`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_batch.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_generated/generated_arguments.output.txt`,
`../../../examples/__outputs__/55_document-builder/document-builder_batch.output.txt`,
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @vitest-environment node

// WARNING:
// This test is generated by scripts/generate-example-derivatives/generate.ts
// Do not modify this file directly.

import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`document-builder_directive`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_directive.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_document-builder/document-builder_directive.output.txt`,
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`generated_directive`, async () => {
const exampleResult = await runExample(`./examples/55_generated/generated_directive.ts`)
test(`document-builder_document`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_document.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_generated/generated_directive.output.txt`,
`../../../examples/__outputs__/55_document-builder/document-builder_document.output.txt`,
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @vitest-environment node

// WARNING:
// This test is generated by scripts/generate-example-derivatives/generate.ts
// Do not modify this file directly.

import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`document-builder_interface`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_interface.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_document-builder/document-builder_interface.output.txt`,
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @vitest-environment node

// WARNING:
// This test is generated by scripts/generate-example-derivatives/generate.ts
// Do not modify this file directly.

import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`document-builder_root-field`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_root-field.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_document-builder/document-builder_root-field.output.txt`,
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { expect, test } from 'vitest'
import { runExample } from '../../../scripts/generate-examples-derivatives/helpers.js'

test(`generated_batch`, async () => {
const exampleResult = await runExample(`./examples/55_generated/generated_batch.ts`)
test(`document-builder_union`, async () => {
const exampleResult = await runExample(`./examples/55_document-builder/document-builder_union.ts`)
// Examples should output their data results.
const exampleResultMaybeEncoded = exampleResult
// If ever outputs vary by Node version, you can use this to snapshot by Node version.
// const nodeMajor = process.version.match(/v(\d+)/)?.[1] ?? `unknown`
await expect(exampleResultMaybeEncoded).toMatchFileSnapshot(
`../../../examples/__outputs__/55_generated/generated_batch.output.txt`,
`../../../examples/__outputs__/55_document-builder/document-builder_union.output.txt`,
)
})
19 changes: 0 additions & 19 deletions tests/examples/55_generated/generated_document.test.ts

This file was deleted.

19 changes: 0 additions & 19 deletions tests/examples/55_generated/generated_interface.test.ts

This file was deleted.

19 changes: 0 additions & 19 deletions tests/examples/55_generated/generated_root-field.test.ts

This file was deleted.

19 changes: 0 additions & 19 deletions tests/examples/55_generated/generated_union.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion website/content/_snippets/example-links/alias.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/generated/alias">Alias</a></p>
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/alias">Alias</a></p>
2 changes: 1 addition & 1 deletion website/content/_snippets/example-links/arguments.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/generated/arguments">Arguments</a></p>
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/arguments">Arguments</a></p>
2 changes: 1 addition & 1 deletion website/content/_snippets/example-links/batch.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/generated/batch">Batch</a></p>
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/batch">Batch</a></p>
2 changes: 1 addition & 1 deletion website/content/_snippets/example-links/directive.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/generated/directive">Directive</a></p>
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/directive">Directive</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/alias">Alias</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/arguments">Arguments</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/batch">Batch</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/directive">Directive</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/document">Document</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/interface">Interface</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/root-field">Root Field</a> <span class="ExampleLinksSeparator"></span> <a href="../../examples/document-builder/union">Union</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/alias">Alias</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/arguments">Arguments</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/batch">Batch</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/directive">Directive</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/document">Document</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="ExampleLinks">Examples <span class="ExampleLinksTitleSeparator">-></span> <a href="../../examples/document-builder/interface">Interface</a></p>
Loading