Skip to content

Commit cef6a8c

Browse files
committed
updates
1 parent e5b466e commit cef6a8c

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# GraphQL Playground Express.js Example
2+
3+
```sh
4+
$ yarn
5+
$ node index.js
6+
```

packages/graphql-playground-middleware/examples/express/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const bodyParser = require('body-parser')
33
const {graphqlExpress} = require('apollo-server-express')
44
const {makeExecutableSchema} = require('graphql-tools')
55
const {expressPlayground} = require('graphql-playground-middleware')
6-
const cors = require('cors')
76

87
const schema = makeExecutableSchema({
98
typeDefs: `
@@ -24,8 +23,6 @@ const PORT = 4000
2423

2524
const app = express()
2625

27-
app.use(cors())
28-
2926
// bodyParser is needed just for POST.
3027
app.use('/graphql', bodyParser.json(), graphqlExpress({ schema }))
3128
app.get('/playground', expressPlayground({ endpoint: '/graphql' })) // if you want GraphiQL enabled
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# GraphQL Playground Hapi Example
2+
3+
```sh
4+
$ yarn
5+
$ node index.js
6+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# GraphQL Playground Koa.js Example
2+
3+
```sh
4+
$ yarn
5+
$ node index.js
6+
```

0 commit comments

Comments
 (0)