Skip to content

Commit

Permalink
chore(example): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
I committed Jul 26, 2016
1 parent 0df66ae commit 39acdfb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
8 changes: 3 additions & 5 deletions example/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"rules": {
"no-console": 0
}
}
---
rules:
no-console: 0
5 changes: 3 additions & 2 deletions example/hapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ server.connection({ port: 3003 });

// redirect all requests to /graphql
// to open GraphiQL by default
server.ext('onRequest', function redirect(request, reply) {
server.ext('onRequest', (request, reply) => {
if (request.path === '/graphql') {
return reply.continue();
reply.continue();
return;
}
reply.redirect('/graphql');
});
Expand Down
8 changes: 3 additions & 5 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require('babel-register');
require('babel-polyfill');
require('./express');
require('./koa');
require('./hapi');
import './express';
import './koa';
import './hapi';
3 changes: 2 additions & 1 deletion example/koa.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ app.use(graffiti.koa({

// redirect all requests to /graphql
// to open GraphiQL by default
app.use(function *redirect() {
app.use(function *redirect(next) {
this.redirect('/graphql');
yield next;
});

app.listen(3002, (err) => {
Expand Down
17 changes: 8 additions & 9 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
},
"dependencies": {
"@risingstack/graffiti": "../",
"@risingstack/graffiti-mongoose": "^5.0.10",
"babel-polyfill": "^6.7.4",
"body-parser": "^1.15.0",
"express": "^4.13.4",
"graphql": "^0.5.0",
"koa": "^1.2.0",
"koa-bodyparser": "^2.0.1",
"koa-static": "^2.0.0",
"mongoose": "^4.4.14"
"@risingstack/graffiti-mongoose": "^5.2.0",
"body-parser": "1.15.2",
"express": "4.14.0",
"graphql": "0.6.2",
"koa": "1.2.1",
"koa-bodyparser": "2.2.0",
"koa-static": "2.0.0",
"mongoose": "4.5.7"
}
}
3 changes: 2 additions & 1 deletion example/schema/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import mongoose from 'mongoose';
import { getSchema } from '@risingstack/graffiti-mongoose';
import User from './user';
import Pet from './pet';
import { getSchema } from '@risingstack/graffiti-mongoose';

mongoose.Promise = global.Promise;
mongoose.connect(process.env.MONGO_URI || 'mongodb://localhost/graphql');

export default getSchema([Pet, User]);

0 comments on commit 39acdfb

Please sign in to comment.