Skip to content

Commit

Permalink
chore(docs): twoslash-ify http transport guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Sep 6, 2024
1 parent 8e78757 commit a70403c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions website/content/guides/transports/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,15 @@ You can generally configure aspects of the transport in three ways:
3. Using extensions.

```ts twoslash
import * as GGGGGGGG from 'graffle'
// @noErrors
GGGGGGGG.
// ^|
// const graffle = Graffle.create({ schema: 'ignoreme' })
// // ---cut---
// graffle.create({
// transport: {
// headers: { authorization: '...' },
// raw: { mode: 'cors' },
// },
// })
import { Graffle } from 'graffle'
// ---cut---
Graffle.create({
schema: 'https://...',
transport: {
headers: { authorization: '...' },
raw: { mode: 'cors' },
},
})
```

## GET
Expand All @@ -53,8 +50,11 @@ GGGGGGGG.

By default all requests use HTTP POST. However you can configure queries and subscriptions to be sent over HTTP GET.

```ts
```ts twoslash
import { Graffle } from 'graffle'
// ---cut---
graffle.create({
schema: 'https://...',
transport: { methodMode: 'getReads' },
})
```
Expand Down

0 comments on commit a70403c

Please sign in to comment.