From a70403c99e67d5a7fba6f56edddf1d7d5158276a Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Fri, 6 Sep 2024 17:04:51 -0400 Subject: [PATCH] chore(docs): twoslash-ify http transport guide --- website/content/guides/transports/http.md | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/content/guides/transports/http.md b/website/content/guides/transports/http.md index 6d95baf2..df92b804 100644 --- a/website/content/guides/transports/http.md +++ b/website/content/guides/transports/http.md @@ -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 @@ -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' }, }) ```