Skip to content

Commit 4545eb4

Browse files
committed
feat: export TypedDocumentString
1 parent 7b105c5 commit 4545eb4

10 files changed

+59
-101
lines changed

examples/output|output_envelope.output.test.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/output|output_envelope.output.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
headers: Headers {
2020
connection: 'keep-alive',
2121
'content-length': '119',
22-
'x-served-by': 'cache-yul1970043-YUL',
22+
'x-served-by': 'cache-yul1970039-YUL',
2323
'accept-ranges': 'bytes',
2424
date: 'Sun, 08 Sep 2024 18:13:26 GMT',
2525
'content-type': 'application/graphql-response+json; charset=utf-8',
@@ -32,13 +32,13 @@
3232
'alt-svc': 'h3=":443"; ma=86400',
3333
'access-control-allow-origin': '*',
3434
'x-powered-by': 'Stellate',
35-
age: '95906',
35+
age: '109533',
3636
'cache-control': 'public, s-maxage=2628000, stale-while-revalidate=2628000',
3737
'x-cache': 'HIT',
38-
'x-cache-hits': '1',
38+
'x-cache-hits': '17',
3939
'gcdn-cache': 'HIT',
40-
'stellate-rate-limit-budget-remaining': '13',
41-
'stellate-rate-limit-rules': '"IP limit";type="RequestCount";budget=50;limited=?0;remaining=13;refill=10',
40+
'stellate-rate-limit-budget-remaining': '45',
41+
'stellate-rate-limit-rules': '"IP limit";type="RequestCount";budget=50;limited=?0;remaining=45;refill=60',
4242
'stellate-rate-limit-decision': 'pass',
4343
'stellate-rate-limit-budget-required': '5',
4444
'content-encoding': 'br'

examples/raw_rawString_rawTyped__rawString-typed.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { Graffle } from '../src/entrypoints/main.js'
2-
// todo from '../src/entrypoints/utils.js'
3-
import type { TypedDocumentString } from '../src/layers/0_functions/types.js'
1+
import { Graffle, type TypedDocumentString } from '../src/entrypoints/main.js'
42
import { publicGraphQLSchemaEndpoints, show } from './$/helpers.js'
53

64
const graffle = Graffle.create({

examples/transport-http|transport-http_extension_headers__dynamicHeaders.output.test.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/transport-http|transport-http_extension_headers__dynamicHeaders.output.txt

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

src/entrypoints/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export { execute } from '../layers/0_functions/execute.js'
22
export { gql } from '../layers/0_functions/gql.js'
3+
export { type TypedDocumentString } from '../layers/0_functions/types.js'
34
// todo figure this export out. Was just put there to resolve a type error about "...cannot be named..."
45
export * from '../layers/6_client/Settings/Input.js'
56
// todo figure this export out. Was just put there to resolve a type error about "...cannot be named..."

website/.vitepress/configExamples.ts

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,76 @@
1-
import { DefaultTheme } from 'vitepress'
21

3-
export const sidebarExamples: DefaultTheme.SidebarItem[] = [
2+
import { DefaultTheme } from 'vitepress'
3+
4+
export const sidebarExamples:DefaultTheme.SidebarItem[] = [
45
{
5-
'text': 'Transport Memory',
6-
'link': '/examples/transport-memory',
6+
"text": "Transport Memory",
7+
"link": "/examples/transport-memory"
78
},
89
{
9-
'text': 'Raw Typed',
10-
'link': '/examples/raw-typed',
10+
"text": "Raw Typed",
11+
"link": "/examples/raw-typed"
1112
},
1213
{
13-
'text': 'Raw String Typed',
14-
'link': '/examples/raw-string-typed',
14+
"text": "Raw String Typed",
15+
"link": "/examples/raw-string-typed"
1516
},
1617
{
17-
'text': 'Raw String',
18-
'link': '/examples/raw-string',
18+
"text": "Raw String",
19+
"link": "/examples/raw-string"
1920
},
2021
{
21-
'text': 'Raw',
22-
'link': '/examples/raw',
22+
"text": "Raw",
23+
"link": "/examples/raw"
2324
},
2425
{
25-
'text': 'Generated',
26-
'items': [
26+
"text": "Generated",
27+
"items": [
2728
{
28-
'text': 'Arguments',
29-
'link': '/examples/generated-arguments',
30-
},
31-
],
29+
"text": "Arguments",
30+
"link": "/examples/generated-arguments"
31+
}
32+
]
3233
},
3334
{
34-
'text': 'Output',
35-
'items': [
35+
"text": "Output",
36+
"items": [
3637
{
37-
'text': 'Default',
38-
'link': '/examples/output-default',
38+
"text": "Default",
39+
"link": "/examples/output-default"
3940
},
4041
{
41-
'text': 'Envelope',
42-
'link': '/examples/output-envelope',
43-
},
44-
],
42+
"text": "Envelope",
43+
"link": "/examples/output-envelope"
44+
}
45+
]
4546
},
4647
{
47-
'text': 'Transport Http',
48-
'items': [
48+
"text": "Transport Http",
49+
"items": [
4950
{
50-
'text': 'Abort',
51-
'link': '/examples/transport-http-abort',
51+
"text": "Abort",
52+
"link": "/examples/transport-http-abort"
5253
},
5354
{
54-
'text': 'Custom Fetch',
55-
'link': '/examples/transport-http-custom-fetch',
55+
"text": "Custom Fetch",
56+
"link": "/examples/transport-http-custom-fetch"
5657
},
5758
{
58-
'text': 'Dynamic Headers',
59-
'link': '/examples/transport-http-dynamic-headers',
59+
"text": "Dynamic Headers",
60+
"link": "/examples/transport-http-dynamic-headers"
6061
},
6162
{
62-
'text': 'Headers',
63-
'link': '/examples/transport-http-headers',
63+
"text": "Headers",
64+
"link": "/examples/transport-http-headers"
6465
},
6566
{
66-
'text': 'Method Get',
67-
'link': '/examples/transport-http-method-get',
67+
"text": "Method Get",
68+
"link": "/examples/transport-http-method-get"
6869
},
6970
{
70-
'text': 'Raw',
71-
'link': '/examples/transport-http-raw',
72-
},
73-
],
74-
},
71+
"text": "Raw",
72+
"link": "/examples/transport-http-raw"
73+
}
74+
]
75+
}
7576
]

website/content/examples/output-envelope.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ console.log(result)
4646
headers: Headers {
4747
connection: 'keep-alive',
4848
'content-length': '119',
49-
'x-served-by': 'cache-yul1970043-YUL',
49+
'x-served-by': 'cache-yul1970039-YUL',
5050
'accept-ranges': 'bytes',
5151
date: 'Sun, 08 Sep 2024 18:13:26 GMT',
5252
'content-type': 'application/graphql-response+json; charset=utf-8',
@@ -59,13 +59,13 @@ console.log(result)
5959
'alt-svc': 'h3=":443"; ma=86400',
6060
'access-control-allow-origin': '*',
6161
'x-powered-by': 'Stellate',
62-
age: '95906',
62+
age: '109533',
6363
'cache-control': 'public, s-maxage=2628000, stale-while-revalidate=2628000',
6464
'x-cache': 'HIT',
65-
'x-cache-hits': '1',
65+
'x-cache-hits': '17',
6666
'gcdn-cache': 'HIT',
67-
'stellate-rate-limit-budget-remaining': '13',
68-
'stellate-rate-limit-rules': '"IP limit";type="RequestCount";budget=50;limited=?0;remaining=13;refill=10',
67+
'stellate-rate-limit-budget-remaining': '45',
68+
'stellate-rate-limit-rules': '"IP limit";type="RequestCount";budget=50;limited=?0;remaining=45;refill=60',
6969
'stellate-rate-limit-decision': 'pass',
7070
'stellate-rate-limit-budget-required': '5',
7171
'content-encoding': 'br'

website/content/examples/raw-string-typed.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ aside: false
66

77
<!-- dprint-ignore-start -->
88
```ts twoslash
9-
import { Graffle } from 'graffle'
10-
// todo from 'graffle/utils'
11-
import type { TypedDocumentString } from '../src/layers/0_functions/types.js'
9+
import { Graffle, type TypedDocumentString } from 'graffle'
1210

1311
const graffle = Graffle.create({
1412
schema: `https://countries.trevorblades.com/graphql`,

website/content/examples/transport-http-dynamic-headers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ await graffle.rawString({ document: `{ languages { code } }` })
4343
headers: Headers {
4444
accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',
4545
'content-type': 'application/json',
46-
'x-sent-at-time': '1725915111383'
46+
'x-sent-at-time': '1725928738805'
4747
},
4848
signal: undefined,
4949
method: 'post',

0 commit comments

Comments
 (0)