Skip to content

Commit

Permalink
Show v2 info in README
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Sep 20, 2022
1 parent 900a716 commit 1b59ce6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ Fully-featured GraphQL Server with focus on easy setup, performance & great deve
### Installation

```shell
npm i graphql-yoga graphql
npm i @graphql-yoga/node graphql
```

### Quickstart

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

```ts
import { createServer } from 'http'
import { createYoga } from 'graphql-yoga'
import { createServer } from '@graphql-yoga/node'

const yoga = createYoga({
const server = createServer({
schema: {
typeDefs: /* GraphQL */ `
type Query {
Expand All @@ -35,8 +34,7 @@ const yoga = createYoga({
},
})

const server = createServer(yoga)
server.listen(4000)
server.start(4000)
```

## Overview
Expand Down

0 comments on commit 1b59ce6

Please sign in to comment.