Skip to content

Commit 9ad7136

Browse files
authored
improve(jsdoc): gql send method (#1265)
1 parent 6e37072 commit 9ad7136

File tree

80 files changed

+462
-498
lines changed

Some content is hidden

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

80 files changed

+462
-498
lines changed

examples/20_output/output_return-error_return-error-execution__return-error-execution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ try {
3434
throw new Error(`Something went wrong.`)
3535
})
3636
.query
37-
.pokemon({ name: true })
37+
.pokemons({ name: true })
3838
} catch (error) {
3939
show(error)
4040
}

examples/30_gql/gql_gql-string.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const graffle = Graffle.create({
1111

1212
const data = await graffle.gql`
1313
{
14-
pokemon {
14+
pokemons {
1515
name
1616
}
1717
}

examples/50_anyware/anyware_slot_slot-body__slot-body.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ const graffle = Graffle
2020
})
2121

2222
const result = await graffle.gql`
23-
query pokemon {
24-
trainers { name }
23+
query pokemons {
24+
pokemons { name }
2525
}
2626
query trainers {
27-
pokemon { name }
27+
trainers { name }
2828
}
29-
`.send(`pokemon`)
29+
`.send(`pokemons`)
3030

3131
show(result)

examples/50_anyware/anyware_slot_slot-body__slot-search-params.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const graffle = Graffle
1212
searchParams: (graphqlRequest) => {
1313
return {
1414
query: graphqlRequest.query,
15-
operationName: `getPokemon`,
15+
operationName: `getPokemons`,
1616
}
1717
},
1818
},
@@ -23,8 +23,8 @@ const result = await graffle.gql`
2323
query getTrainers {
2424
trainers { name }
2525
}
26-
query getPokemon {
27-
pokemon { name }
26+
query getPokemons {
27+
pokemons { name }
2828
}
2929
`
3030
.send(`getTrainers`)

examples/__outputs__/10_transport-http/transport-http_extension_headers__dynamicHeaders.output.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
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': '1730125688291'
7+
'x-sent-at-time': '1731942324944'
88
},
9-
signal: undefined,
109
method: 'post',
1110
url: 'http://localhost:3000/graphql',
1211
body: '{"query":"{ pokemons { name } }"}'

examples/__outputs__/20_output/output_envelope.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
headers: Headers {
1717
'content-type': 'application/graphql-response+json; charset=utf-8',
1818
'content-length': '142',
19-
date: 'Mon, 28 Oct 2024 14:28:09 GMT',
19+
date: 'Mon, 18 Nov 2024 15:05:25 GMT',
2020
connection: 'keep-alive',
2121
'keep-alive': 'timeout=5'
2222
},

examples/__outputs__/30_gql/gql_gql-string.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---------------------------------------- SHOW ----------------------------------------
22
{
3-
pokemon: [
3+
pokemons: [
44
{ name: 'Pikachu' },
55
{ name: 'Charizard' },
66
{ name: 'Squirtle' },
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---------------------------------------- SHOW ----------------------------------------
22
{
3-
pokemon: [
4-
{ name: 'Pikachu' },
5-
{ name: 'Charizard' },
6-
{ name: 'Squirtle' },
7-
{ name: 'Bulbasaur' },
8-
{ name: 'Caterpie' },
9-
{ name: 'Weedle' }
3+
trainers: [
4+
{ name: 'Ash' },
5+
{ name: 'Misty' },
6+
{ name: 'Brock' },
7+
{ name: 'Gary' }
108
]
119
}

examples/__outputs__/50_anyware/anyware_slot_slot-body__slot-search-params.output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---------------------------------------- SHOW ----------------------------------------
22
{
3-
pokemon: [
3+
pokemons: [
44
{ name: 'Pikachu' },
55
{ name: 'Charizard' },
66
{ name: 'Squirtle' },

examples/__outputs__/60_extension/extension_introspection__introspection.output.txt

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,14 @@
639639
defaultValue: null,
640640
isDeprecated: false,
641641
deprecationReason: null
642+
},
643+
{
644+
name: 'type',
645+
description: null,
646+
type: { kind: 'ENUM', name: 'PokemonType', ofType: null },
647+
defaultValue: null,
648+
isDeprecated: false,
649+
deprecationReason: null
642650
}
643651
],
644652
interfaces: null,
@@ -735,22 +743,6 @@
735743
isDeprecated: false,
736744
deprecationReason: null
737745
},
738-
{
739-
name: 'pokemon',
740-
description: null,
741-
args: [],
742-
type: {
743-
kind: 'LIST',
744-
name: null,
745-
ofType: {
746-
kind: 'NON_NULL',
747-
name: null,
748-
ofType: { kind: 'OBJECT', name: 'Pokemon', ofType: null }
749-
}
750-
},
751-
isDeprecated: false,
752-
deprecationReason: null
753-
},
754746
{
755747
name: 'pokemonByName',
756748
description: null,

0 commit comments

Comments
 (0)