Skip to content

Commit da83048

Browse files
authored
docs: move Koa integration above fetch [skip ci]
1 parent e3b85ff commit da83048

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,21 @@ fastify.listen({ port: 4000 });
141141
console.log('Listening to port 4000');
142142
```
143143

144+
##### With [`Koa`](https://koajs.com/)
145+
146+
```js
147+
import Koa from 'koa'; // yarn add koa
148+
import mount from 'koa-mount'; // yarn add koa-mount
149+
import { createHandler } from 'graphql-http/lib/use/koa';
150+
import { schema } from './previous-step';
151+
152+
const app = new Koa();
153+
app.use(mount('/graphql', createHandler({ schema })));
154+
155+
app.listen({ port: 4000 });
156+
console.log('Listening to port 4000');
157+
```
158+
144159
##### With [`Deno`](https://deno.land/)
145160

146161
```ts
@@ -190,21 +205,6 @@ export default {
190205
};
191206
```
192207

193-
##### With [`Koa`](https://koajs.com/)
194-
195-
```js
196-
import Koa from 'koa'; // yarn add koa
197-
import mount from 'koa-mount'; // yarn add koa-mount
198-
import { createHandler } from 'graphql-http/lib/use/koa';
199-
import { schema } from './previous-step';
200-
201-
const app = new Koa();
202-
app.use(mount('/graphql', createHandler({ schema })));
203-
204-
app.listen({ port: 4000 });
205-
console.log('Listening to port 4000');
206-
```
207-
208208
#### Use the client
209209

210210
```js

0 commit comments

Comments
 (0)