Skip to content

Commit 1b59ce6

Browse files
authored
Show v2 info in README
1 parent 900a716 commit 1b59ce6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ Fully-featured GraphQL Server with focus on easy setup, performance & great deve
99
### Installation
1010

1111
```shell
12-
npm i graphql-yoga graphql
12+
npm i @graphql-yoga/node graphql
1313
```
1414

1515
### Quickstart
1616

1717
You will need to provide schema to Yoga, either by an existing executable schema, or by providing your type definitions and resolver map:
1818

1919
```ts
20-
import { createServer } from 'http'
21-
import { createYoga } from 'graphql-yoga'
20+
import { createServer } from '@graphql-yoga/node'
2221

23-
const yoga = createYoga({
22+
const server = createServer({
2423
schema: {
2524
typeDefs: /* GraphQL */ `
2625
type Query {
@@ -35,8 +34,7 @@ const yoga = createYoga({
3534
},
3635
})
3736

38-
const server = createServer(yoga)
39-
server.listen(4000)
37+
server.start(4000)
4038
```
4139

4240
## Overview

0 commit comments

Comments
 (0)