Skip to content

Commit 90097bc

Browse files
authored
Update documentation for v6 release (#616)
1 parent bc549eb commit 90097bc

File tree

4 files changed

+110
-179
lines changed

4 files changed

+110
-179
lines changed

src/use/bun.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface Extra {
3535
* they default [`sendPingsAutomatically` to `true`](https://github.com/oven-sh/bun/blob/6a163cf933542506354dc836bd92693bcae5939b/src/deps/uws.zig#L893).
3636
*
3737
* ```ts
38-
* import { makeHandler, handleProtocols } from 'graphql-ws/lib/use/lib/bun';
38+
* import { makeHandler, handleProtocols } from 'graphql-ws/use/bun';
3939
* import { schema } from './my-schema';
4040
*
4141
* Bun.serve({

src/use/deno.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface Extra {
3333
* import {
3434
* makeHandler,
3535
* GRAPHQL_TRANSPORT_WS_PROTOCOL,
36-
* } from 'https://esm.sh/graphql-ws/lib/use/deno';
36+
* } from 'https://esm.sh/graphql-ws/use/deno';
3737
* import { schema } from './my-schema.ts';
3838
*
3939
* const handler = makeHandler({ schema });

website/src/pages/get-started.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ export const schema = new GraphQLSchema({
5858
#### With [ws](https://github.com/websockets/ws)
5959

6060
```ts
61-
// import ws from 'ws'; yarn add ws@7
62-
// const WebSocketServer = ws.Server;
63-
import { useServer } from 'graphql-ws/lib/use/ws';
61+
import { useServer } from 'graphql-ws/use/ws';
6462
import { WebSocketServer } from 'ws'; // yarn add ws
6563

6664
import { schema } from './previous-step';
@@ -78,7 +76,7 @@ console.log('Listening to port 4000');
7876
#### With [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js)
7977

8078
```ts
81-
import { makeBehavior } from 'graphql-ws/lib/use/uWebSockets';
79+
import { makeBehavior } from 'graphql-ws/use/uWebSockets';
8280
import uWS from 'uWebSockets.js'; // yarn add uWebSockets.js@uNetworking/uWebSockets.js#<tag>
8381

8482
import { schema } from './previous-step';
@@ -99,7 +97,7 @@ uWS
9997
import fastifyWebsocket from '@fastify/websocket'; // yarn add @fastify/websocket
10098
import Fastify from 'fastify'; // yarn add fastify
10199

102-
import { makeHandler } from 'graphql-ws/lib/use/@fastify/websocket';
100+
import { makeHandler } from 'graphql-ws/use/@fastify/websocket';
103101
import { schema } from './previous-step';
104102

105103
const fastify = Fastify();
@@ -121,7 +119,7 @@ fastify.listen(4000, (err) => {
121119
#### With [Bun](https://bun.sh)
122120

123121
```ts
124-
import { handleProtocols, makeHandler } from 'graphql-ws/lib/use/bun';
122+
import { handleProtocols, makeHandler } from 'graphql-ws/use/bun';
125123
import { schema } from './previous-step';
126124

127125
Bun.serve({
@@ -155,7 +153,7 @@ import { serve } from 'https://deno.land/std/http/mod.ts';
155153
import {
156154
GRAPHQL_TRANSPORT_WS_PROTOCOL,
157155
makeHandler,
158-
} from 'https://esm.sh/graphql-ws/lib/use/deno';
156+
} from 'https://esm.sh/graphql-ws/use/deno';
159157
import { schema } from './previous-step.ts';
160158

161159
const handler = makeHandler({ schema });

0 commit comments

Comments
 (0)