From 4d20f70290601692b81930a3eabac378eb0ef89e Mon Sep 17 00:00:00 2001 From: I Date: Sat, 30 Apr 2016 12:20:33 +0200 Subject: [PATCH] chore(package): update dependencies --- example/package.json | 8 +++---- package.json | 47 +++++++++++++++++++------------------ src/express/express.js | 2 +- src/express/express.spec.js | 2 +- src/hapi/hapi.js | 2 +- src/koa/koa.js | 2 +- src/util/util.js | 2 +- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/example/package.json b/example/package.json index bd036e5..e0171f9 100644 --- a/example/package.json +++ b/example/package.json @@ -7,14 +7,14 @@ }, "dependencies": { "@risingstack/graffiti": "../", - "@risingstack/graffiti-mongoose": "^5.0.9", - "babel-polyfill": "^6.7.2", + "@risingstack/graffiti-mongoose": "^5.0.10", + "babel-polyfill": "^6.7.4", "body-parser": "^1.15.0", "express": "^4.13.4", - "graphql": "^0.4.18", + "graphql": "^0.5.0", "koa": "^1.2.0", "koa-bodyparser": "^2.0.1", "koa-static": "^2.0.0", - "mongoose": "^4.4.7" + "mongoose": "^4.4.14" } } diff --git a/package.json b/package.json index 4519acc..943e3e0 100644 --- a/package.json +++ b/package.json @@ -28,33 +28,34 @@ }, "homepage": "https://github.com/RisingStack/graffiti#readme", "dependencies": { - "boom": "^3.1.2" + "boom": "3.1.2" }, "peerDependencies": { - "graphql": "^0.4.17" + "graphql": "^0.5.0" }, "devDependencies": { - "babel": "^6.5.1", - "babel-cli": "^6.6.5", - "babel-eslint": "^5.0.0-beta6", - "babel-polyfill": "^6.7.2", - "babel-preset-es2015": "^6.6.0", - "babel-preset-stage-0": "^6.5.0", - "babel-register": "^6.7.2", - "chai": "^3.5.0", - "chai-subset": "^1.2.0", - "co-mocha": "^1.1.2", - "eslint": "^2.4.0", - "eslint-config-airbnb": "^6.1.0", - "eslint-plugin-react": "^4.2.1", - "express": "^4.13.4", - "graphql": "^0.4.17", - "hapi": "^13.2.1", - "koa": "^2.0.0-alpha.2", - "mocha": "^2.4.5", - "pre-commit": "^1.1.2", - "sinon": "^1.17.3", - "sinon-chai": "^2.8.0" + "babel": "6.5.2", + "babel-cli": "6.7.7", + "babel-eslint": "6.0.4", + "babel-polyfill": "6.7.4", + "babel-preset-es2015": "6.6.0", + "babel-preset-stage-0": "6.5.0", + "babel-register": "6.7.2", + "chai": "3.5.0", + "chai-subset": "1.2.2", + "co-mocha": "1.1.2", + "eslint": "2.9.0", + "eslint-config-airbnb": "8.0.0", + "eslint-plugin-import": "1.6.1", + "eslint-plugin-react": "5.0.1", + "express": "4.13.4", + "graphql": "0.5.0", + "hapi": "13.3.0", + "koa": "2.0.0-alpha.2", + "mocha": "2.4.5", + "pre-commit": "1.1.2", + "sinon": "1.17.3", + "sinon-chai": "2.8.0" }, "pre-commit": [ "eslint", diff --git a/src/express/express.js b/src/express/express.js index ebc295d..1c30651 100644 --- a/src/express/express.js +++ b/src/express/express.js @@ -38,7 +38,7 @@ export default function middleware({ graphiql = true, schema = required() } = {} // ignore } - return graphql(schema, query, request, parsedVariables) + return graphql(schema, query, request, request, parsedVariables) .then((result) => { if (result.errors) { const message = result.errors.map((error) => error.message).join('\n'); diff --git a/src/express/express.spec.js b/src/express/express.spec.js index f6f6c64..7b937aa 100644 --- a/src/express/express.spec.js +++ b/src/express/express.spec.js @@ -190,7 +190,7 @@ describe('graffiti express', () => { query: `mutation mutate($data: String!) { updateData(data: $data) }`, - variables: '{ "data": "123" }' + variables: JSON.stringify({ data: '123' }) }, accepts: (type) => type === 'json' }; diff --git a/src/hapi/hapi.js b/src/hapi/hapi.js index db7095f..2774b76 100644 --- a/src/hapi/hapi.js +++ b/src/hapi/hapi.js @@ -36,7 +36,7 @@ const plugin = { // ignore } - return graphql(schema, query, request, parsedVariables) + return graphql(schema, query, request, request, parsedVariables) .then((result) => { if (result.errors) { const message = result.errors.map((error) => error.message).join('\n'); diff --git a/src/koa/koa.js b/src/koa/koa.js index 16622d8..806d650 100644 --- a/src/koa/koa.js +++ b/src/koa/koa.js @@ -33,7 +33,7 @@ export default function middleware({ graphiql = true, schema = required() } = {} // ignore } - this.body = yield graphql(schema, query, this, parsedVariables); + this.body = yield graphql(schema, query, this, this, parsedVariables); return this.body; } diff --git a/src/util/util.js b/src/util/util.js index 8b67597..876ddee 100644 --- a/src/util/util.js +++ b/src/util/util.js @@ -14,7 +14,7 @@ export function required() { throw new Error('Required option is missing'); } -const GRAPHIQL_VERSION = '0.6.0'; +const GRAPHIQL_VERSION = '0.7.1'; export function renderGraphiQL({ query, variables, version = GRAPHIQL_VERSION } = {}) { return `