Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be35d9c

Browse files
author
Sashko Stubailo
authored
Merge pull request #58 from apollostack/graphql-server
Upgrade to GraphQL Server 0.4
2 parents b065668 + dc0f328 commit be35d9c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import express from 'express';
3-
import { apolloExpress, graphiqlExpress } from 'apollo-server';
3+
import { graphqlExpress, graphiqlExpress } from 'graphql-server-express';
44
import bodyParser from 'body-parser';
55

66
import {
@@ -33,7 +33,7 @@ app.use(bodyParser.json());
3333

3434
setUpGitHubLogin(app);
3535

36-
app.use('/graphql', apolloExpress((req) => {
36+
app.use('/graphql', graphqlExpress((req) => {
3737
// Get the query, the same way express-graphql does it
3838
// https://github.com/graphql/express-graphql/blob/3fa6e68582d6d933d37fa9e841da5d2aa39261cd/src/index.js#L257
3939
const query = req.query.query || req.body.query;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
"nodemon": "1.11.0"
4141
},
4242
"dependencies": {
43-
"apollo-server": "0.3.3",
4443
"body-parser": "1.15.2",
4544
"connect-session-knex": "1.2.0",
4645
"dataloader": "1.2.0",
4746
"dotenv": "2.0.0",
4847
"express": "4.14.0",
4948
"express-session": "1.14.1",
5049
"graphql": "0.7.2",
50+
"graphql-server-express": "^0.4.1",
5151
"graphql-subscriptions": "0.2.0",
5252
"graphql-tools": "0.7.2",
5353
"knex": "0.12.6",

0 commit comments

Comments
 (0)